PHPackages                             saasscaleup/laravel-stream-log - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. saasscaleup/laravel-stream-log

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

saasscaleup/laravel-stream-log
==============================

Easily stream your Laravel application logs to the frontend in real-time using server-sent event (SSE)

1.0.6(2y ago)36133MITPHPPHP ^7.0|^8.0

Since Dec 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/saasscaleup/laravel-stream-log)[ Packagist](https://packagist.org/packages/saasscaleup/laravel-stream-log)[ Docs](https://github.com/saasscaleup/laravel-stream-log)[ Fund](https://buymeacoffee.com/scaleupsaas)[ GitHub Sponsors](https://github.com/saasscaleup)[ RSS](/packages/saasscaleup-laravel-stream-log/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (8)Used By (0)

[![Main Window two](https://github.com/saasscaleup/laravel-stream-log/raw/master/lsl-saasscaleup.png?raw=true)](https://github.com/saasscaleup/laravel-stream-log/blob/master/lsl-saasscaleup.png?raw=true)

### Easily stream your Laravel application logs to the frontend in real-time using server-sent event (SSE)

[](#easily-stream-your-laravel-application-logs-to-the-frontend-in-real-time-using-server-sent-event-sse)

####  [Youtube](https://youtube.com/@ScaleUpSaaS)  ·  [Twitter](https://twitter.com/ScaleUpSaaS)  ·  [Facebook](https://facebook.com/ScaleUpSaaS)  ·  [Buy Me a Coffee](https://buymeacoffee.com/scaleupsaas)

[](#--youtube------twitter------facebook------buy-me-a-coffee)

 [ ![Latest Stable Version](https://camo.githubusercontent.com/df4e69d9882871fb54949e9d4853291d18917ccab3bcb00b4e497fc35952df05/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736161737363616c6575702f6c61726176656c2d73747265616d2d6c6f672e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/saasscaleup/laravel-stream-log) [ ![Total Downloads](https://camo.githubusercontent.com/148fb92e60b0fdd0486e150fb218f381a4ca0db0686d5ccb5a1eb1ec4f2a83ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736161737363616c6575702f6c61726176656c2d73747265616d2d6c6f672e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/saasscaleup/laravel-stream-log) [ ![License](https://camo.githubusercontent.com/fe68bb351731fdd8bb3f2b171356a608fcbaaf77d680a9d5fda19b578cdae8ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736161737363616c6575702f6c61726176656c2d73747265616d2d6c6f672e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/saasscaleup/laravel-stream-log)

✨ Features
----------

[](#-features)

- **Easily stream your Backend events from your Controllers \\ Events \\ Models \\ Etc... .**
- **Easily stream your Logs (`storage/logs/laravel.log`).**
- **Print Backend logs and events to Frontend browser `console.log(data)`**

[![banner](https://github.com/saasscaleup/laravel-stream-log/raw/master/lsl-demo.gif?raw=true)](https://github.com/saasscaleup/laravel-stream-log/blob/master/lsl-demo.gif?raw=true)

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

[](#requirements)

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

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

[](#installation)

### Install composer package (dev)

[](#install-composer-package-dev)

Via Composer - Not recommended for production environment

```
$ composer require --dev saasscaleup/laravel-stream-log
```

#### For Laravel &lt; 5.5

[](#for-laravel--55)

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

```
Saasscaleup\LSL\LSLServiceProvider::class,
```

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

```
'LSL' => Saasscaleup\LSL\Facades\LSLFacade::class,
```

---

### Publish package's config, migration and view files

[](#publish-packages-config-migration-and-view-files)

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

```
$ php artisan vendor:publish --provider="Saasscaleup\LSL\LSLServiceProvider"
```

### Run migration command

[](#run-migration-command)

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

```
$ php artisan migrate
```

Setup Laravel Stream Log -&gt; LSL
----------------------------------

[](#setup-laravel-stream-log---lsl)

Aadd this in your main view/layout (usually `layout/app.blade.php`) file:

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

Configuration
-------------

[](#configuration)

Configuration is done via environment variables or directly in the configuration file (`config/lsl.php`).

```
