'Gauche', 'Centre' => 'Centre', 'Droite' => 'Droite', ]; public static function options(): array { return self::all(); } public static function validationRule(): string { return 'required|in:' . implode(',', array_column(self::cases(), 'value')); } public function toBootstrap(): string { return match ($this) { self::Gauche => 'start', self::Centre => 'center', self::Droite => 'end', }; } }