How do we make filters in Laravel 5? Is the idea of filters going away?
Create a middleware with
php artisan make:middleware class_name
Create a short-hand key in your app/Providers/RouteServiceProvider.php :
protected $middleware = [
// ....
'shortName' => 'App\Http\Middleware\class_name',
];
You can now enable it to any Route (just like the L4 filters):
$router->post('url', ['middleware' => 'shortName', function() {
...
}]);