Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Real-time Apps with Laravel 5.1 and Event Broadcasting
Jun 10, 2015 @ 16:53:38

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.

tagged: tutorial laravel5 realtime application pusher event broadcasting

Link: http://www.sitepoint.com/real-time-apps-laravel-5-1-event-broadcasting/


Trending Topics: