Laravel seems to automatically add the auth middleware to all my new routes fro some reason. I have routes that I made earlier without auth and they are still listed properly. All the new routes that I make seem to automatically get the auth middleware regardless of whether I specify it or not. I haven't changed anything in the Middleware or Kernel.
Here are two examples:
This was made earlier:
Route::namespace('Reports')->group(function () {
//GET Forms
Route::get('/report/registration', 'FormController@registration');
});
In the php artisan route:list
GET|HEAD | report/registration | App\Http\Controllers\Reports\FormController@registration | web |
And this was made now:
Route::get('/terms', 'HomeController@terms');
Route::get('/privacy', 'HomeController@privacy');
In the php artisan route:list
GET|HEAD | terms | App\Http\Controllers\HomeController@terms | web,auth |
How do I remove the auth middleware from these routes? I tried explicitly mentioning middleware('guest') but that just added it to the list as in the middleware was web, auth, guest in the route:list.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2OVep0U
via IFTTT
Aucun commentaire:
Enregistrer un commentaire