I use vue.js and Laravel 5.1 to create a small file sharing application.
Everything works fine, but now I wanted to make sure that the owner of each file can remove users from his file (he had to share the file with these users first), so I make a PUT request to the URL called /files/share.
My Laravel route is as follows:
Route::put('/files/share', 'FileController@test');
When I launched php artisan route:list, it will also be listed.
Client code is as follows:
this.$http.put('/files/share', { some_data }, function(data) {
if(data.error){
this.$set('error', data.error);
} else {
this.$set('file', data);
}
});
The exact error I get is this:
2/2 NotFoundHttpException in Handler.php line 46:
No query results for model [App\File].
1/2 ModelNotFoundException in Builder.php line 129:
No query results for model [App\File].
But the application does not even reach the controller, if I just return something there, the error is the same.