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
How can we use middleware in laravel?
Provide the steps to configure laravel application?
What is the difference between echo print print_r and var_dump?
Why we use Laravel - Artisan Console ?
How to configure a mail-in laravel?
What is monolog library in laravel?
How to register a service provider via composer in laravel?
How to get configuration values in laravel?
How to use multiple or condition in laravel query?
How do I use eloquent to get a list of comments with one author each avoiding n+1 queries?
What is api php in laravel?
What are service providers in laravel?
What is Terminable Middleware ?
How we can upload files in laravel? Explain
How to start mysql on valet?