- 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
32 lines
818 B
PHP
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,
|
|
];
|
|
}
|
|
}
|