ldc-legaulois/database/factories/ConsumptionMomentFactory.php

30 lines
729 B
PHP
Raw Permalink Normal View History

2024-04-25 16:58:41 +02:00
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
2024-04-25 16:58:41 +02:00
class ConsumptionMomentFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
2024-04-25 16:58:41 +02:00
{
$title = fake()->words(rand(1, 2), true);
2026-09-25 16:25:31 +02:00
2024-04-25 16:58:41 +02:00
return [
'title' => $title,
'subtitle' => fake()->text(10),
'slug' => Str::of($title)->slug(),
'description' => fake()->text(),
'picture' => '',
'picture_alt' => fake()->sentence(),
'picture_title' => fake()->sentence(),
2024-04-25 16:58:41 +02:00
];
}
}