route('settings')); } /** * Prepare the data for validation. * * @return void */ protected function prepareForValidation() { $this->mergePicture('logo'); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { $rules = [ 'sub_title' => 'nullable|min:2|max:110', 'footer_phrase' => 'required|min:2|max:110', 'color' => ['required', new Hex()], 'home_timeout' => 'required|numeric|min:20|max:900', ]; return \array_merge( $rules, $this->pictureRules('logo', 420, 500, 420, 500, false) ); } /** * Get custom attributes for validator errors. * * @return array */ public function attributes(): array { return [ 'color' => \trans('validation.custom.color'), 'logo' => \trans('validation.custom.logo'), 'home_timeout' => \trans('validation.custom.home_timeout'), 'sub_title' => \trans('validation.custom.sub_title'), 'footer_phrase' => \trans('validation.custom.footer_phrase'), ]; } }