Skip to content

EventSource API allows to communicate with client in a unidirectional way. EventSource API generates a HTTP Request to server, retrieves the data. This repository contains the integration of Javascript Server Send Events(SSE) with PHP framework Laravel.

License

Notifications You must be signed in to change notification settings

seguce92/laravel-php-event-source

Repository files navigation

JavaScript EventSource API with Laravel

version npm David npm PyPI

Dependencies

Run composer update to get all the dependencies.

Run Project

Run php artisan serve to build the project. The project will run on http://localhost:8000. Alternatively you can paste the code in any directory and create a virtual host for it or you can access it form apache/htdocs

How to Use

Navigate to /hit or you can click on the link on the home page. Enter name and message.

Make sure your landing page is not closed and you will see notification like that -

The stream is generated from the landing page.

About

EventSource API allows to communicate with client in a unidirectional way. EventSource API generates a HTTP Request to server, retrieves the data. This repository contains the integration of Javascript Server Send Events(SSE) with PHP framework Laravel.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published