> */ public function rules(): array { return [ 'page_id' => ['required', 'integer', 'exists:pages,id'], 'blocks' => ['present', 'array'], 'blocks.*.type' => ['required', 'string', 'max:50'], 'blocks.*.content' => ['present', 'array'], 'blocks.*.order_index' => ['required', 'integer', 'min:0'], ]; } /** * @return array */ public function messages(): array { return [ 'page_id.required' => 'Sayfa ID zorunludur.', 'page_id.exists' => 'Geçersiz sayfa.', 'blocks.present' => 'Bloklar alanı gereklidir.', 'blocks.*.type.required' => 'Blok tipi zorunludur.', 'blocks.*.order_index.required' => 'Blok sırası zorunludur.', ]; } }