How do we make filters in Laravel 5? Is the idea of filters going away?
filters.php has been removed and replaced by Kernel.php beside routes.php
protected $routeMiddleware = [
'auth' => 'App\Http\Middleware\Authenticate',
'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth',
'guest' => 'App\Http\Middleware\RedirectIfAuthenticated',
];
But you can't directly add your filter code directly, you should first create a Middleware class (app/Http/Middleware) Then but your desired key in Kernel.php file and reference its own Middleware class, such as:
'product.check' => 'App\Http\Middleware\ProductChecker'