mercredi 29 mars 2017

Laravel Method store does not exist

I am trying to copy a file to my server Public Folder.

I am getting the following error :

BadMethodCallException in Macroable.php line 74: Method store does not exist.

This is the html to upload the file :

 <form action="/leads/csvFiles" method="post" enctype="multipart/form-data">
                            
                            <input type="file" name="csvfile" />
                            <input type="submit"/>
                        </form>

And here is the Route:

Route::post('leads/csvFiles', function(){

request()->file('csvfile')->store('Public');
return back();


});



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire