mercredi 17 février 2016

Laravel 5 Image upload

I use Laravel 5.1 and want to upload a image within my form:

blade:

 <form method="POST" action="{{ url('upload') }}" enctype="multipart/form-data">
    <input name="picture" type="file" class="uploader" id="picture" value="Upload" />
 </form>

Within my controller I use:

if ($request->hasFile('picture'){}

The problem is that the if statement always return false. Any ideas why? Thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire