create fake data laravel

Solutions on MaxInterview for create fake data laravel by the best coders in the world

showing results for - "create fake data laravel"
Fabian
10 Jul 2016
1// php artisan make:seeder NameOfTheSeeder
2
3<?php
4
5namespace Database\Seeders;
6
7use App\Models\ModelName;
8use Illuminate\Database\Seeder;
9
10class ModelNameSeeder extends Seeder
11{
12    /**
13     * Run the database seeds.
14     *
15     * @return void
16     */
17    public function run()
18    {
19        ModelName::factory()->count(50)->create();
20    }
21}