phpvms/app/Database/factories/NewsFactory.php
2018-04-11 20:01:41 -05:00

15 lines
343 B
PHP

<?php
use Faker\Generator as Faker;
$factory->define(App\Models\News::class, function (Faker $faker) {
return [
'id' => null,
'user_id' => function() {
return factory(App\Models\User::class)->create()->id;
},
'subject' => $faker->text(),
'body' => $faker->sentence,
];
});