我不确定我的文件上传的原因是什么。它失败并重新导回,但是不与错误。文件上传重定向错误不显示
控制器
public function updateLogo()
{
$inputs = Input::all();
$logo_path = Input::only('logo_path');
$cpe_mac = $inputs['cpe_mac'];
$rule = ['logo_path' => 'mimes:jpeg,bmp,png'];
$validator = Validator::make($logo_path, $rule);
if ($validator->fails()) {
return Redirect::to($cpe_mac.'/view-profile/')->withErrors($validator)->withInput();
} else {
.....
}
查看
{!! Form::open(array('url' => '/'.$cpe_mac.'/view-profile/logo/update', 'class' => 'form-horizontal', 'role' =>'form','id' => 'editLogo','file'=>true)) !!}
<input name="logo_path" type="file" required> <br><br>
<button class="btn btn-success btn-sm mr5" type="file"><i class="fa fa-user"></i> Update Logo</button>
{!! Form::hidden('cpe_mac', $cpe_mac)!!}
{{ csrf_field() }}
{!! Form::close();!!}
我是不是忘了什么东西?