In Laravel < 5.2, middlewares implemented an interface described by this contract: Illuminate\Contracts\Routing\Middleware
.
Now, a Middleware created with artisan does not implement anything anymore. And the contract was removed with no explaination (unless I mistake).
Is there a reason?
As per laravel 5.2 upgrade guide at official documentation under Deprecations section:
The Illuminate\Contracts\Routing\Middleware
contract has been deprecated. No contract is required on your middleware. In addition, the TerminableMiddleware
contract has also been deprecated. Instead of implementing the interface, simply define a terminate
method on your middleware.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With