45 lines
1.3 KiB
PHP
45 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\DansLesPresContent;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class DansLesPresContentFactory extends Factory
|
|
{
|
|
/**
|
|
* Counter
|
|
*
|
|
* @var integer
|
|
*/
|
|
protected static $i = 1;
|
|
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = DansLesPresContent::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'picture' => '/assets/images/pages_elevages/breeding-page.jpg',
|
|
// * Only youtube for now ( vu avec sylvain )
|
|
'video_link' => 'https://www.youtube.com/embed/M7lc1UVf-VE',
|
|
'isVideo' => (bool)rand(0, 1),
|
|
'content' => '<h3>Title</h3><p>' . $this->faker->text(45) . '</p><p>' .
|
|
$this->faker->text(45) .
|
|
// phpcs:ignore Generic.Strings.UnnecessaryStringConcat.Found
|
|
'</p><ul><li>100% végétale et minérale dont 60% de céréales minimum</li>' .
|
|
'<li>A base de céréales entières 100% françaises*</li></ul>',
|
|
'order' => static::$i++,
|
|
'status' => (bool)rand(0, 1)
|
|
];
|
|
}
|
|
}
|