mergePicture('picture'); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { $rules = [ 'name' => 'required|min:2|max:90', 'brand_id' => 'required|exists:brands,id' ]; return \array_merge( $rules, $this->pictureRules('picture', 500, 500, 800, 500, false) ); } /** * Get custom attributes for validator errors. * * @return array */ public function attributes(): array { return [ 'brand_id' => \trans_choice('models.classes.brand', 1), ]; } }