2020-03-03 13:32:40 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
|
|
|
|
|
|
|
use App\BlogPost;
|
|
|
|
use Faker\Generator as Faker;
|
2020-03-09 11:47:30 +01:00
|
|
|
use DavidBadura\FakerMarkdownGenerator\FakerProvider as FakerMarkdownProvider;
|
2020-03-03 13:32:40 +01:00
|
|
|
|
|
|
|
$factory->define(BlogPost::class, function (Faker $faker) {
|
2020-03-09 11:47:30 +01:00
|
|
|
$mdProvider = new FakerMarkdownProvider($faker);
|
|
|
|
$faker->addProvider($mdProvider);
|
|
|
|
|
2020-03-03 13:32:40 +01:00
|
|
|
return [
|
2020-03-09 11:47:30 +01:00
|
|
|
'title' => $faker->realText(80),
|
|
|
|
'body' => $faker->markdown(),
|
2020-03-03 13:32:40 +01:00
|
|
|
];
|
|
|
|
});
|