user()->hasPermission('update-pages'); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { $page = $this->route('page'); $pageId = $page instanceof \App\Models\Page ? $page->id : $page; return $this->baseRules($pageId); } }