BaseMiddleware
in package
AbstractYes
Middleware can run on every request and every response.
They have access to every request.
You can use these to encrypt
Remember when the request has not yet fully in the controller, we have no response yet
So before that time, only the request is populated.
Also, middlewares run before authentication backends therefore on the request part, they have no access to the authenticated user
Tags
Table of Contents
Methods
- run() : mixed
- This method is called to run the middleware. Every middleware must implement this method.
Methods
run()
This method is called to run the middleware. Every middleware must implement this method.
public
abstract run(Request $request, Response|null $response) : mixed