DEV Community

Cover image for Laravel LogNotify
Sarfraz Ahmed
Sarfraz Ahmed

Posted on

Laravel LogNotify

Laravel package to automatically show notifications in real-time whenever there is new log entry made anywhere in application.

GitHub logo sarfraznawaz2005 / lognotify

Laravel package to automatically show notifications in real-time whenever there is new log entry made anywhere in application.

Latest Version on Packagist Total Downloads

Laravel LogNotify

Laravel package to automatically show notifications in real-time whenever there is new log entry made anywhere in application.

Screenshot

Main Window

Requirements

  • PHP >= 5.6
  • Laravel 5

Installation

Via Composer

$ composer require sarfraznawaz2005/lognotify
Enter fullscreen mode Exit fullscreen mode

For Laravel < 5.5:

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

Sarfraznawaz2005\LogNotify\LogNotifyServiceProvider::class,
Enter fullscreen mode Exit fullscreen mode

Publish package's config file by running below command:

$ php artisan vendor:publish --provider="Sarfraznawaz2005\LogNotify\LogNotifyServiceProvider"
Enter fullscreen mode Exit fullscreen mode

It should publish config/lognotify.php config file.

Usage

Add this in your app layout file/footer:

@include('logNotify::view')
Enter fullscreen mode Exit fullscreen mode

And then start socket server by issuing following command:

$ php artisan lognotify:serve
Enter fullscreen mode Exit fullscreen mode

Now whenever new entry is made in laravel log file, you will see popup notification at bottom right of your application.

Customizing Notifications

You can customize notifications ui by modifying published file at resources/views/vendor/logNotify/view.blade.php

Credits

License

Please see the license file for more information.




Top comments (0)