Jul 20, 2016
3
Level 1
Remove web middleware group in 5.2
I know that web middleware group is now assigned to every route. But how to remove for specific route?
Level 50
So this got me curious enough to look into it a bit more, how to get around the global middlewares and I found the solution actually wasn't that complicated.
Just edit RouteServiceProvider.php and add your routes..
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function map(Router $router)
{
$this->mapWebRoutes($router);
// Add your routes here..
$router->get('/foo', 'App\Http\Controllers\FooController@index');
}
Please or to participate in this conversation.