route('company')); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { $rules = [ 'name' => [ 'required', 'string', 'between:3,255', 'unique:companies,name,' . request()->company->getKey(), ], ]; return \array_merge(parent::rules(), $rules); } }