And you dont have any other routes at all, which are not listed here?
If not, can you then show the content of the store method?
Hello Developers, This is my route list
| web |
| | GET|HEAD | gallery | gallery.index | App\Http\Controllers\GalleryController@index
| web |
| | POST | gallery | gallery.store | App\Http\Controllers\GalleryController@store
| web |
| | GET|HEAD | gallery/create | gallery.create | App\Http\Controllers\GalleryController@create
| web |
| | GET|HEAD | gallery/{gallery} | gallery.show | App\Http\Controllers\GalleryController@show
| web |
| | PUT|PATCH | gallery/{gallery} | gallery.update | App\Http\Controllers\GalleryController@update
| web |
| | DELETE | gallery/{gallery} | gallery.destroy | App\Http\Controllers\GalleryController@destroy
| web |
| | GET|HEAD | gallery/{gallery}/edit | gallery.edit | App\Http\Controllers\GalleryController@edit
| web |
and this is my vuejs method for uploading file.
uploadfile() {
if (!this.file_names.length) {
console.log("no file has been selected");
return false;
}
for (let i = 0; i < this.file_names.length; i++) {
this.form.append('pics[]', this.file_names[i]);
}
const config = { headers: { 'content-Type': 'multipart/Form-data' } };
axios.post('/gallery', this.form, config)
.then(res => {
console.log(res);
})
.catch(error => {
console.log(error);
})
}
}
when i click upload it shows me POST http://127.0.0.1:8000/gallery 404 (Not Found)
Please or to participate in this conversation.