PHPackages                             takielias/laravel-sse-extended - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. takielias/laravel-sse-extended

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

takielias/laravel-sse-extended
==============================

Laravel package to provide Server Sent Events functionality for your app.

v0.0.6(6y ago)012MITPHPPHP ^7.0

Since Nov 1Pushed 6y agoCompare

[ Source](https://github.com/takielias/laravel-sse-extended)[ Packagist](https://packagist.org/packages/takielias/laravel-sse-extended)[ Docs](https://github.com/takielias/laravel-sse-extended)[ RSS](/packages/takielias-laravel-sse-extended/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (7)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e404e28196d327b27b39f477b00bfa47ac72fbf643bc86781de04ef7d24b6be1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74616b69656c6961732f6c61726176656c2d7373652d657874656e6465642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/takielias/laravel-sse-extended)[![Total Downloads](https://camo.githubusercontent.com/ed26d3808e36dffee63aaafceca6d4ab7db6ac768f96fd14d578097310322408/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74616b69656c6961732f6c61726176656c2d7373652d657874656e6465642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/takielias/laravel-sse-extended)

Laravel SSE Extended
====================

[](#laravel-sse-extended)

Laravel package to provide Server Sent Events functionality for your app. You can use this package to show instant notifications to your users without them having to refresh their pages.

Requirements
------------

[](#requirements)

- PHP &gt;= 7
- Laravel 5/6

Installation
------------

[](#installation)

Via Composer

```
$ composer require takielias/laravel-sse-extended
```

For Laravel &lt; 5.5:

Add Service Provider to `config/app.php` in `providers` section

```
takielias\SSE\ServiceProvider::class,
```

Add Facade to `config/app.php` in `aliases` section

```
'SSE' => takielias\SSE\Facades\SSEFacade::class,
```

---

Publish package's config, migration and view files by running below command:

```
$ php artisan vendor:publish --provider="takielias\SSE\ServiceProvider"
```

Run `php artisan migrate` to create `sselogs` table.

Setup SSE
---------

[](#setup-sse)

Setup config options in `config/sse.php` file and then add this in your view/layout file:

```
@include('sse::view')
```

Usage
-----

[](#usage)

Syntax:

```
/**
 * @param string $message : notification message
 * @param string $type : alert, success, error, warning, info
 * @param string $event : Type of event such as "EmailSent", "UserLoggedIn", etc
 */
SSEFacade::notify($message, $type = 'info', $event = 'message')
```

To show popup notifications on the screen, in your controllers/event classes, you can do:

```
use takielias\SSE\Facades\SSEFacade;

public function myMethod()
{
    SSEFacade::notify('hello world....');

    // or via helper
    sse_notify('hi there');
}
```

Customizing Notification Library
--------------------------------

[](#customizing-notification-library)

By default, package uses [noty](https://github.com/needim/noty) for showing notifications. You can customize this by modifying code in `resources/views/vendor/sse/view.blade.php` file.

Customizing SSE Events
----------------------

[](#customizing-sse-events)

By default, pacakge uses `message` event type for streaming response:

```
SSEFacade::notify($message, $type = 'info', $event = 'message')
```

Notice `$event = 'message'`. You can customize this, let's say you want to use `UserLoggedIn` as SSE event type:

```
use takielias\SSE\Facades\SSEFacade;

public function myMethod()
{
    SSEFacade::notify('hello world....', 'info', 'UserLoggedIn');

    // or via helper
    sse_notify('hi there', 'info', 'UserLoggedIn');
}
```

Then you need to handle this in your view yourself like this:

```

var es = new EventSource("{{route('__sse_stream__')}}");

es.addEventListener("UserLoggedIn", function (e) {
    var data = JSON.parse(e.data);
    alert(data.message);
}, false);

```

Note
----

[](#note)

[Server Sent Events](https://en.wikipedia.org/wiki/Server-sent_events) technology consumes server resources so use it sparingly or better use Web Sockets instead.

Credits
-------

[](#credits)

- [Taki Elias](https://github.com/takielias)

License
-------

[](#license)

Please see the [license file](license.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

6

Last Release

2377d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fad247d1f93a5e71551ddb8719214e25ebbc427726d50359e243b7f4f2aacbfc?d=identicon)[takielias](/maintainers/takielias)

---

Top Contributors

[![takielias](https://avatars.githubusercontent.com/u/38932580?v=4)](https://github.com/takielias "takielias (8 commits)")

---

Tags

eventlaravelservernotificationssserealtimepollingSever Sent Events

### Embed Badge

![Health badge](/badges/takielias-laravel-sse-extended/health.svg)

```
[![Health](https://phpackages.com/badges/takielias-laravel-sse-extended/health.svg)](https://phpackages.com/packages/takielias-laravel-sse-extended)
```

###  Alternatives

[sarfraznawaz2005/laravel-sse

Laravel package to provide Server Sent Events functionality for your app.

474.6k](/packages/sarfraznawaz2005-laravel-sse)[sebdesign/laravel-state-machine

Winzou State Machine service provider for Laravel

3401.3M1](/packages/sebdesign-laravel-state-machine)[qruto/laravel-wave

Painless Laravel Broadcasting with SSE.

87048.4k](/packages/qruto-laravel-wave)[envant/fireable

An elegant way to trigger events based on attributes changes

445793.9k3](/packages/envant-fireable)[php-junior/laravel-video-chat

Laravel Video Chat using Socket.IO and WebRTC

82018.1k](/packages/php-junior-laravel-video-chat)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
