Via Matt Stauffer:
Sometimes it’s a lot of work to create an event, create its handler, and bind the two. Create a command, create its handler, bind the two. I’ve often wished for a workflow that handled the whole process together in one.
The artisan commands for generating commands and events are a good start–they both create their own entity and (optionally) its handler. But you still can spend an hour writing the command and handler, and then waste another 15 minutes trying to figure out why it’s not working, only to realize you never actually bound the two together.
Well, dear reader, your white-knuckled wait is finally over. In Laravel 5, you can bind (non-existen) events and handlers in the EventServiceProvider, run php artisan event:generate, and Artisan will automatically generate the files for you–both for the Event and its Handler.
Matt’s been a role lately with all the new Laravel goodies. It’s neat to get see all these useful features explained before the docs are even created.
Larvel™ A new enterprise framework
PHP is one of the most widely used web development languages, but it has long been considered the worst to work with.…
Debugging Laravel with Zend Z-Ray
Zend has recently released a new product named Z-Ray which is a debugging solution that works with Zend Server and in…