2021-09-23 13:35:48 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
|
|
|
|
|
|
|
|
|
use App\Models\SubRange;
|
|
|
|
|
use Faker\Generator as Faker;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Model Factories
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| This directory should contain each of the model factory definitions for
|
|
|
|
|
| your application. Factories provide a convenient way to generate new
|
|
|
|
|
| model instances for testing / seeding your application's database.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
$factory->define(SubRange::class, function (Faker $faker) {
|
2021-09-24 00:18:02 +02:00
|
|
|
$title = $faker->unique()->words(rand(2, 5), true);
|
2021-09-23 13:35:48 +02:00
|
|
|
return [
|
|
|
|
|
'name' => $title,
|
2021-09-24 00:18:02 +02:00
|
|
|
'picture' => null,
|
|
|
|
|
'picture_alt' => null,
|
2021-09-23 13:35:48 +02:00
|
|
|
'back_link_text' => 'En savoir +',
|
|
|
|
|
'back_link_url' => '/on-s-engage/le-gaulois-marque-engagee-et-responsable/bien-nourrir-tous-les-francais',
|
2021-09-24 00:18:02 +02:00
|
|
|
'title' => $faker->words(6, true),
|
|
|
|
|
'subtitle' => $faker->words(10, true),
|
2021-09-23 13:35:48 +02:00
|
|
|
'content' => $faker->text(1500)
|
|
|
|
|
];
|
|
|
|
|
});
|