When I route:list
all routes in the system, I find some of the routes have Closure
middleware.
Although I did only assign api
and auth
a middlewares
api.php
Route::post('api/favorites/{post}', 'api/favorites/{post}')->middleware('auth');
Output
| Method | URI | Action | Middleware
-------------------------------------------------------------------------------------
| POST | api/favorites/{post} | \FavoritesController@favorite | api,auth,Closure