New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

vcian/pulse-active-sessions

A Laravel Pulse card to show active user session.
98,677 113
Install
composer require vcian/pulse-active-sessions
Latest Version:v1.7.2
PHP:^8.1
Laravel:4 – 11
License:MIT
Last Updated:Jan 30, 2025
Links: GitHub  ·  Packagist
Maintainer: vcian

Packagist License (custom server) Packagist Downloads (custom server)

Active Sessions card for Laravel Pulse

This card will show total number of sessions in application.

Installation

Require the package with Composer:

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.

return [
    // ...
    
    'recorders' => [
+        \Vcian\Pulse\PulseActiveSessions\Recorders\PulseActiveSessionRecorder::class => [],
    ]
]

You also need to be running the pulse:check command.

Add to your dashboard

To add the card to the Pulse dashboard, you must first publish the vendor view.

Then, you can modify the dashboard.blade.php file:

<x-pulse>
+    <livewire:pulse_active_session cols='4' rows='2' />

    <livewire:pulse.servers cols="full" />

    <livewire:pulse.usage cols="4" rows="2" />

    <livewire:pulse.queues cols="4" />

    <livewire:pulse.cache cols="4" />

    <livewire:pulse.slow-queries cols="8" />

    <livewire:pulse.exceptions cols="6" />

    <livewire:pulse.slow-requests cols="6" />

    <livewire:pulse.slow-jobs cols="6" />

    <livewire:pulse.slow-outgoing-requests cols="6" />

</x-pulse>

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.

+    'active_session_threshold' => 100,
Active Sessions Card Active Sessions Card Active Sessions Card Active Sessions Card

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 for more information what has changed recently.

Contributing

Please see CONTRIBUTING 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

License

The MIT License (MIT). Please see License File for more information.

Related Packages

hosmelq/laravel-pulse-schedule

Laravel Pulse card that list all scheduled tasks.

690,881 63
jdarkins/pulse-throttled

A Laravel Pulse card to track users & URL's that are being throttled by your Rat...

5,387 0
abbasudo/pulse-users

Laravel Pulse Card for Users Chart

88,012 33
kalimulhaq/pulse-cronwatch

A Laravel Pulse card and recorder for monitoring scheduled commands (cron jobs):...

1,004 0
rairlie/laravel-locking-session

Provide session locking in Laravel

521,845 91

Version History

Version Released PHP Laravel License
v1.7.2 ^8.1 * MIT
v1.7.1 ^8.1 * MIT
v1.7.0 ^8.1 * MIT
v1.6.0 ^8.1 * MIT
v1.5.1 ^8.1 * MIT