Files
commander_league_api/database/factories/ModelFactory.php
Kevin ANATOLE 0691e5a107 Game formats
- Created the formats tables/migrations
- Created the controller to retrieve the formats
2020-10-31 19:23:04 +00:00

32 lines
785 B
PHP

<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\Model\Format;
use App\User;
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
$factory->define(User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->email,
];
});
$factory->define(Format::class, function (Faker $faker){
return [
'name' => $faker->name
];
});