https://github.com/vcian/pulse-active-sessions
A Laravel Pulse card for active users count.
https://github.com/vcian/pulse-active-sessions
active-sessions laravel laravel-pulse php sessions
Last synced: 11 months ago
JSON representation
A Laravel Pulse card for active users count.
- Host: GitHub
- URL: https://github.com/vcian/pulse-active-sessions
- Owner: vcian
- License: mit
- Created: 2023-12-20T05:21:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-30T11:13:36.000Z (about 1 year ago)
- Last Synced: 2025-05-04T22:40:41.481Z (11 months ago)
- Topics: active-sessions, laravel, laravel-pulse, php, sessions
- Language: Blade
- Homepage: https://packagist.org/packages/vcian/pulse-active-sessions
- Size: 268 KB
- Stars: 110
- Watchers: 5
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README


# Active Sessions card for Laravel Pulse
This card will show total number of sessions in application.
## Installation
Require the package with Composer:
```shell
composer require vcian/pulse-active-sessions
```
Next, you should publish the Pulse configuration and migration files using the vendor:publish Artisan command:
```
php artisan vendor:publish --provider="Laravel\Pulse\PulseServiceProvider"
```
```
php artisan migrate
```
## Register the recorder
Right now, the Composer dependencies will only be checked once per day. To run the checks you must add the `PulseActiveSessionRecorder` to the `pulse.php` file.
```diff
return [
// ...
'recorders' => [
+ \Vcian\Pulse\PulseActiveSessions\Recorders\PulseActiveSessionRecorder::class => [],
]
]
```
You also need to be running [the `pulse:check` command](https://laravel.com/docs/10.x/pulse#dashboard-cards).
## Add to your dashboard
To add the card to the Pulse dashboard, you must first [publish the vendor view](https://laravel.com/docs/10.x/pulse#dashboard-customization).
Then, you can modify the `dashboard.blade.php` file:
```diff
+
```
This feature allows you to dynamically set thresholds and display interactive color-coded indicators based on predefined threshold values. Easily configure these thresholds using the `pulse.php` config file for a visual representation of active sessions.
```diff
+ 'active_session_threshold' => 100,
```




To make pulse recorders will automatically capture entries based on framework events dispatched by Laravel, You must run the below command.
```
php artisan pulse:check
```
That's it!
## Supported session drivers
- database
- file
- redis
- memcached
## Not Supported
- Passport : This will not support when multiple providers used as authentication.It only while using single provider.
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
We believe in
👇
ACT NOW
PERFECT IT LATER
CORRECT IT ON THE WAY.
## Security
If you discover any security-related issues, please email ruchit.patel@viitor.cloud instead of using the issue tracker.
## Credits
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.