I'm trying to upload an image though everytime I submit it's returning that the store() on null error. I've set the form to enctype="multipart/form-data" which hasn't helped.
Can anyone point me in the right direction?
Thanks.
Function inside the controller
public function store(Request $request){
$file = $request->file('imgUpload1')->store('images');
return back();
}
Form below:
<form action="/imgupload" method="POST" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="form-group">
<label for="imgUpload1">File input</label>
<input type="file" id="imgUpload1">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>