ldc-wenn-dann-mit-respekt/database/factories/ConceptFactory.php
2023-03-24 15:39:11 +00:00

42 lines
951 B
PHP

<?php
namespace Database\Factories;
use App\Models\Concept;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends Factory<\App\Models\Concept>
*/
final class ConceptFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Concept::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition(): array
{
$name = fake()->unique()->firstname;
return [
'seo_title' => fake()->word,
'seo_description' => fake()->text,
'name' => $name,
'slug' => Str::slug($name),
'title' => fake()->word,
'subtitle' => fake()->word,
'description' => fake()->text,
'picture_alt' => fake()->word,
'picture_title' => fake()->word,
];
}
}