add subranges system add SubRanges Component add Subranges add on BO Product.edit add Subrange filter on products.index
31 lines
1 KiB
PHP
31 lines
1 KiB
PHP
<?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) {
|
|
$title = $faker->unique()->words(rand(2, 5), true);
|
|
return [
|
|
'name' => $title,
|
|
'picture' => null,
|
|
'picture_alt' => null,
|
|
'back_link_text' => 'En savoir +',
|
|
'back_link_url' => '/on-s-engage/le-gaulois-marque-engagee-et-responsable/bien-nourrir-tous-les-francais',
|
|
'title' => $faker->words(6, true),
|
|
'subtitle' => $faker->words(10, true),
|
|
'content' => $faker->text(1500)
|
|
];
|
|
});
|