abstract:public function upload() { $file = Request::file('img'); $info = $file->validate(['ext' => 
public function upload() { $file = Request::file('img'); $info = $file->validate(['ext' => 'jpg,jpeg,png,gif'])->move('upload'); if($info){ return json(['errno' => 0,'data' => ['/upload/'.$info->getSaveName()]]); }else{ return $info->getError(); } }
嘿嘿,我就喜歡這樣一次性寫完幾個功能再上傳作業(yè),不喜歡走走停停的感覺。
Correcting teacher:韋小寶Correction time:2019-01-11 15:21:56
Teacher's summary:好吧好吧 , 和前面的一樣 寫的都很不錯 繼續(xù)加油吧