Level 6
You could have your two middleware classes extend an abstract middleware class. The handle method of the child classes should call the parent function.
Summer Sale! All accounts are 50% off this week.
Hi all
I'd like to know If is possible to use, and what is the best practice, the Inheritance on Middleware.
For example, I've two routes:
route1/input?param1=value1¶m2=value2
route2/input?param1=value1¶m2=value2¶m3=value3
then, I've two Middleware:
middleware1 for route1
middleware2 for route2
but as you can see, the route2 has param1 and param2 equal to route1.
How I can implement the middleware2 to Inheritance the middleware1?
Thank you, Valentino.
Please or to participate in this conversation.