phpvms/app/Database/factories/NewsFactory.php
2018-08-26 16:40:04 +00:00

15 lines
344 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,
];
});