merge([ 'key' => $this->url->key, ]); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $rules = [ 'key' => [ 'required', 'string', 'max:45', Rule::unique('urls', 'key')->ignore($this->url->id) ], ]; return \array_merge( parent::rules(), $rules, ); } }