> */ public function rules(): array { return [ 'slug' => ['sometimes', 'string', 'max:255', Rule::unique('pages', 'slug')->ignore($this->route('page'))], 'title' => ['sometimes', 'string', 'max:255'], 'content' => ['nullable', 'string'], 'meta_title' => ['nullable', 'string', 'max:255'], 'meta_description' => ['nullable', 'string', 'max:255'], 'is_active' => ['sometimes', 'boolean'], 'blocks' => ['sometimes', 'array'], 'blocks.*.type' => ['required_with:blocks', 'string', 'max:50'], 'blocks.*.content' => ['required_with:blocks', 'array'], 'blocks.*.order_index' => ['sometimes', 'integer', 'min:0'], ]; } /** * @return array */ public function messages(): array { return [ 'slug.unique' => 'Bu slug zaten kullanılıyor.', ]; } }