Tuesday, March 14, 2017

Does Laravel have its own events (not user events)?

I'd like to run some checks on my app before any controller action is executed.
In Zend Framework 2, the framework itself is wired with internal events that you can listen to and I was wondering if Laravel has something like that too. The docs only talk about user events.

By the way, I'm currently addressing this by using a middleware on every request but I feel that for this kind of thing, events are a better fit (since I'm not modifying the request/response at all in my middleware).



via Julian

Advertisement