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()
    {
        Model::unguard();
        $field = Field::create();
            for($i = 0; $i < Config::get('settings.players'); $i++){
                $player = Player::create();
                $field->addPlayer($player);
            }
        Model::reguard();
    }
public function run ( ) { Model :: unguard ( ) ; $ field = Field :: create ( ) ; for ( $ i = 0 ; $ i < Config :: get ( 'settings.players' ) ; $ i ++ ) { $ player = Player :: create ( ) ; $ field -> addPlayer ( $ player ) ; } Model :: reguard ( ) ; }
Run the database seeds.
Run the database seeds .
// $this->call(UserTableSeeder::class);