Add /api/news route

This commit is contained in:
Nabeel Shahzad
2018-04-11 20:01:41 -05:00
parent 8d2fd22e3e
commit 395642f69c
5 changed files with 95 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
<?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,
];
});