我有一个上传者没有规则的工作正常,
但是当我创建一个规则我得到错误:
LogicException in MimeTypeGuesser.PHP line 127:
Unable to guess the mime type as no guessers are available
(Did you enable the PHP_fileinfo extension?)
我的文章请求规则
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'Image' => 'required|mimes:jpeg'
];
}
我的形式
{!! Form::open(['url' => 'blog','files'=> true]) !!}
{!! Form::label('Image','Upload:') !!}
{!! Form::file('Image',null,['class' => 'form-control']) !!}
{!! Form::submit('Submit',['class' => 'btn btn-primary form-control']) !!}
{!! Form::close() !!}