route()->parameter('node'); return $node instanceof Node && $node->exists; } /** * Apply validation rules to this request. Uses the parent class rules() * function but passes in the rules for updating rather than creating. * * @param array|null $rules * @return array */ public function rules(array $rules = null): array { $nodeId = $this->route()->parameter('node')->id; return parent::rules(Node::getUpdateRulesForId($nodeId)); } }