18 lines
450 B
PHP
18 lines
450 B
PHP
<?php
|
|
|
|
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
|
|
|
use App\BlogPost;
|
|
use Faker\Generator as Faker;
|
|
use DavidBadura\FakerMarkdownGenerator\FakerProvider as FakerMarkdownProvider;
|
|
|
|
$factory->define(BlogPost::class, function (Faker $faker) {
|
|
$mdProvider = new FakerMarkdownProvider($faker);
|
|
$faker->addProvider($mdProvider);
|
|
|
|
return [
|
|
'title' => $faker->realText(80),
|
|
'body' => $faker->markdown(),
|
|
];
|
|
});
|