Migrations and factories
This commit is contained in:
13
database/factories/TopicFactory.php
Normal file
13
database/factories/TopicFactory.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use App\Topic;
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(Topic::class, function (Faker $faker) {
|
||||
return [
|
||||
"name" => $faker->name,
|
||||
"slug" => $faker->slug
|
||||
];
|
||||
});
|
Reference in New Issue
Block a user