route('user')); } /** * Prepare the data for validation. * * @return void */ protected function prepareForValidation(): void { $this->merge([ 'published' => $this->boolean('published'), ]); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return array_merge(parent::rules(), [ 'email' => [ 'required', 'email:rfc,strict,dns,spoof,filter', Rule::unique('users', 'email')->ignore(\optional($this->route('user'))->getRouteKey()) ] ]); } }