function UploadImg(){
$file = request()->file('imges');
$id = input('id','','intval');
$root_path = Env::get('app_path');
// dump($file);die;
$info = $file->move($root_path.'public/static/upload/');
dump($info);die;
$return = ['rlt'=>false,'error'=>'操作失败,请重试!','msg'=>''];
return json($return);
}打印$file
但是打印$info就会报Call to a member function move() on null.
最佳答案