28 lines
728 B
PHP
28 lines
728 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
class ConsumptionMomentFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
$title = fake()->words(rand(1, 2), true);
|
|
return [
|
|
'title' => $title,
|
|
'subtitle' => fake()->text(10),
|
|
'slug' => Str::of($title)->slug(),
|
|
'description' => fake()->text(),
|
|
'picture' => '',
|
|
'picture_alt' => fake()->sentence(),
|
|
'picture_title' => fake()->sentence(),
|
|
];
|
|
}
|
|
}
|