Files
fotospiel-app/database/factories/EmotionFactory.php
Codex Agent fa33e7cbcf Fix Event & EventType resource issues and apply formatting
- Fix EventType deletion error handling (constraint violations)
- Fix Event update error (package_id column missing)
- Fix Event Type dropdown options (JSON display issue)
- Fix EventPackagesRelationManager query error
- Add missing translations for deletion errors
- Apply Pint formatting
2026-01-21 10:34:06 +01:00

32 lines
818 B
PHP

<?php
namespace Database\Factories;
use App\Models\Emotion;
use Illuminate\Database\Eloquent\Factories\Factory;
class EmotionFactory extends Factory
{
protected $model = Emotion::class;
public function definition(): array
{
$name = ucfirst($this->faker->unique()->word());
return [
'name' => [
'en' => $name,
'de' => $name,
],
'icon' => $this->faker->randomElement(['smile', 'heart', 'star', 'sparkles']),
'color' => $this->faker->hexColor(),
'description' => [
'en' => $this->faker->sentence(),
'de' => $this->faker->sentence(),
],
'sort_order' => $this->faker->numberBetween(0, 20),
'is_active' => true,
];
}
}