mergePicture('picture'); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $rules = [ 'name' => 'required|string|min:2|max:255', 'picture_alt' => 'nullable|required_with:picture|string|between:3,255', 'picture_title' => 'nullable|required_with:picture|string|between:3,255', ]; $width = config('theme.models.ranges.picture_max_width'); $height = config('theme.models.ranges.picture_max_height'); return \array_merge( $rules, $this->pictureRules('picture', $width, $height, $width, $height, false), ); } }