SitePoint's PHP Blog has a new tutorial posted showing you how to use event broadcasting in Laravel 5 to perform actions based on events the application issues.
In Laravel 5.1, the framework includes functionality called broadcasting events that makes it easy to create real-time apps in PHP. With this new functionality, an app can publish events to various cloud-based real-time PubSub solutions, like Pusher, or to Redis.
They start you off installing their sample application inside of a Homestead Improved virtual machine. They show you how to use the non-realtime version of the application and how the other parts of the application do not update when changes are made. They then create the ItemCreated, ItemUpdated and ItemDeleted events and the related data provider needed to "boot" the events. From there they walk you through installing the Pusher PHP library, including the matching Javascript file and a bit of code to push events and receive them in other parts of your application.