Files
karudhaas/database/factories/ArticleFactory.php

19 lines
515 B
PHP

<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\Article;
use App\Source;
use Faker\Generator as Faker;
$factory->define(Article::class, function (Faker $faker) {
return [
'title' => $faker->sentence,
'author' => $faker->name,
'featured_image' => "https://images-01.avas.mv/post/big_pUd28VpL9K3vQJjHbAZDYlaBl.jpg",
"body" => $faker->paragraph,
"source_id" => factory(App\Source::class),
"published_date" => $faker->dateTime,
];
});