Request::param("pageSize", 10), 'var_page' => 'page', 'page' => Request::param("page", 1), ]; } public static function orderBy() { return Request::param("orderBy", 'id desc'); } public static function upload($data) { $file = $data['file']; $basePath = config('filesystem.disks.public.root'); validate(['file' => ['fileExt:jpg,png,jpeg,bmp,xlsx,xls,webp|fileSize:20*1024*1024']])->check($data); $path = '/images/'.date('Y').'/'.date('m').'/'.date('d'); $fullPath = $basePath.$path; if(!file_exists($fullPath)) { mkdir($fullPath,0777,true); } $imagePath = Filesystem::putFile($path,$file,'md5'); $imagePath = str_replace('\\','/',$imagePath); return ['image_path' =>config('filesystem.disks.public.url').$imagePath ]; } public function __call($name, $arguments) { //找不到方法,自动调用模型中基类方法 return call_user_func_array([$this->model, $name], $arguments); } }