blessing-skin-server/database/factories/PlayerModelFactory.php
2017-11-04 20:25:54 +08:00

22 lines
599 B
PHP

<?php
use App\Models\Player;
$factory->define(Player::class, function (Faker\Generator $faker) {
return [
'uid' => factory(App\Models\User::class)->create()->uid,
'player_name' => $faker->firstName,
'preference' => 'default',
'last_modified' => $faker->dateTime
];
});
$factory->defineAs(Player::class, 'slim', function (Faker\Generator $faker) {
return [
'uid' => factory(App\Models\User::class)->create()->uid,
'player_name' => $faker->firstName,
'preference' => 'slim',
'last_modified' => $faker->dateTime
];
});