1
Good, I’m still new to using the Laravel 5, but I have a problem of Routes that I can not find solution anywhere (just the same problem Here and with no viable solution)
Let me explain, in the Routes.php file when I try to define a route using POST she is not recognized!
Among other routes I have this:
Route::post('guarda-terreno',[
'as'=>'guardaTerrenoPost',
'uses'=>'TerrenoController@store',]);
This route should receive data from a form.
When I try to see the routes defined: php artisan route:list
this route does not appear in the listing. More weird, is that if I change to
Route::get('guarda-terreno',[
'as'=>'guardaTerrenoPost',
'uses'=>'TerrenoController@store',]);
she’s already on the list!
I’ve tried it like this:
Route::post('guarda-terreno', 'TerrenoController@store');
And it doesn’t work!
UseRoute::any('guarda-terreno', 'TerrenoController@store');
he already records me all the methods | GET|HEAD|POST|PUT|PATCH|DELETE |
when I wanted only the POST!
What am I not seeing here?!
have tried
Route::match(['post'],'guarda-terreno',[
'as'=>'guardaTerrenoPost',
'uses'=>'TerrenoController@store',]);
??– SOSTheBlack
I haven’t tried that before... This has already worked, I only have a POST route for the "store" method instead of 6! Is there any particular reason why Route::post('ground guard', 'Terrenocontroller@store'); not give and your solution works? Thanks for the help!
– Ricardo Cruz
is feathers with that route that is giving this problem ?
– SOSTheBlack
gives me the same problem with all Post routes... regardless of model and method! As it is a "rare" problem (because I did not find any solution easily) I will assume that it is my problem and changed some configuration where it should not! Your solution works, so I will adopt it, in a new "clean" protection there I check if it works the POST again! Thanks for the help!
– Ricardo Cruz