mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-04 09:20:21 -05:00
Generate model factories
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(App\Models\Topic::class, function (Faker $faker) {
|
||||
return [
|
||||
'forum_id' => function () {
|
||||
return factory(App\Models\Forum::class)->create()->id;
|
||||
},
|
||||
'first_post_user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
},
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user