> */ public function rules(): array { return [ 'slug' => ['sometimes', 'string', 'max:255', Rule::unique('announcements', 'slug')->ignore($this->route('announcement'))], 'title' => ['sometimes', 'string', 'max:255'], 'category' => ['sometimes', 'string', Rule::enum(AnnouncementCategory::class)], 'excerpt' => ['nullable', 'string', 'max:500'], 'content' => ['sometimes', 'string'], 'image' => ['nullable', 'string', 'max:255'], 'is_featured' => ['sometimes', 'boolean'], 'meta_title' => ['nullable', 'string', 'max:255'], 'meta_description' => ['nullable', 'string', 'max:255'], 'published_at' => ['nullable', 'date'], ]; } /** * @return array */ public function messages(): array { return [ 'slug.unique' => 'Bu slug zaten kullanılıyor.', ]; } }