Answer Posted / nafees ahmad
Terminable middleware performs some task after the response has been sent to the browser.
This can be accomplished by creating a middleware with terminate method in the middleware.
Terminable middleware should be registered with global middleware.
The terminate method will receive two arguments $request and $response.
Example : Create TerminateMiddleware by executing the below command.
"php artisan make:middleware TerminateMiddleware".
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is meant by Global Middleware and Route Middleware ?
How can you generate urls?
What do you know about csrf token in laravel? How can someone turn off csrf protection for a specific route?
What is a laravel model?
What is a facade?
What is auth in laravel?
List the applications supported by valet?
How can we get the user's ip address in laravel?
List out the databases laravel supports?
What do you call a single quote?
What is use of model in laravel?
What is a service provider laravel?
Explain how to generate pretty urls in laravel?
How install react js in laravel?
Explain how to localize resource uris in laravel?