check() and $this->ajax(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { return [ 'upload' => [ 'required', 'image', 'mimes:jpeg,png,jpg', 'max:5048', 'dimensions:min_width=567,min_height=567,max_width:1008,max_height:1008', ], 'folder' => 'required|string|between:3,255', ]; } }