database/seeders/DatabaseSeeder.php
/**
     * Seed the application's database.
     *
     * @return void
     */
Seed the application's database.
@return void
Seed the application ' s database . @return void
public function run()
    {
        \App\Models\Article::factory(15)->create();
        \App\Models\Category::factory(15)->create();
        \App\Models\Comment::factory(20)->create();
        \App\Api::factory(15)->create();
        \App\Models\User::factory()->create([
            "name"=>"AA",
            "email"=>"a@gmail.com"
        ]);
        \App\Models\User::factory()->create([
            "name"=>"b",
            "email"=>"b@gmail.com"
        ]);
    }
public function run ( ) { \ App \ Models \ Article :: factory ( 15 ) -> create ( ) ; \ App \ Models \ Category :: factory ( 15 ) -> create ( ) ; \ App \ Models \ Comment :: factory ( 20 ) -> create ( ) ; \ App \ Api :: factory ( 15 ) -> create ( ) ; \ App \ Models \ User :: factory ( ) -> create ( [ " name " => " AA " , " email " => " a@gmail.com " ] ) ; \ App \ Models \ User :: factory ( ) -> create ( [ " name " => " b " , " email " => " b@gmail.com " ] ) ; }
Seed the application's database.
Seed the application ' s database .
// \App\Models\User::factory(10)->create();