database/seeds/DatabaseSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        factory(App\User::class, 10)->create()->each(function($user) {
            $user->save();
        });
        factory(App\Book::class, 100)->create()->each(function ($book){
            $book->save();
        });
    }
public function run ( ) { factory ( App \ User :: class , 10 ) -> create ( ) -> each ( function ( $ user ) { $ user -> save ( ) ; } ) ; factory ( App \ Book :: class , 100 ) -> create ( ) -> each ( function ( $ book ) { $ book -> save ( ) ; } ) ; }
Run the database seeds.
Run the database seeds .
// $this->call(UsersTableSeeder::class);