Search by

jeffersongoncalves / filament-session-management

jeffersongoncalves

A Filament plugin to read and manage Laravel's database sessions: see who is logged in, inspect decoded payloads, revoke and prune sessions from your panel.

Package info

github.com/jeffersongoncalves/filament-session-management

pkg:composer/jeffersongoncalves/filament-session-management

Statistics

Installs: 22

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

3.0.1 2026-10-24 19:11 UTC

This package is auto-updated.

Last update: 2026-10-24 19:15:21 UTC


README

Filament Session Management

Filament Session Management

Buy Me A Coffee

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads License

A Filament plugin to read and manage Laravel's database sessions from your panel: see who is logged in, from which IP and device, inspect decoded session payloads, revoke sessions and prune expired ones. It is built on top of the framework-agnostic jeffersongoncalves/laravel-session-management core and the shared jeffersongoncalves/filament-plugin-core.

Features

  • 👥 Sessions table with user, IP address, user agent, last activity and an Active / Expired / Current badge
  • 🔎 Filters by status (active / expired) and by authenticated vs guest sessions
  • 🧾 View page with the decoded payload as pretty JSON (CSRF token and password hashes masked, objects never instantiated)
  • 🚪 Revoke a session, or many in bulk; your own current session is always kept
  • 🧹 "Prune expired" header action
  • 🔢 Navigation badge with the number of active sessions
  • 🌍 19 languages
  • ⚙️ Fluent customisation of the navigation group, sort, icon, slug and user attribute

Compatibility

Plugin Version Filament
1.x 3.x
2.x 4.x
3.x 5.x

Installation

composer require jeffersongoncalves/filament-session-management:"^3.0"

You can publish the config file with:

php artisan vendor:publish --tag="filament-session-management-config"

This plugin reads the table written by Laravel's database session driver. Make sure SESSION_DRIVER=database and the sessions table exists.

Usage

use Filament\Panel;
use JeffersonGoncalves\Filament\SessionManagement\FilamentSessionManagementPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentSessionManagementPlugin::make()
                ->navigationGroup('System')        // default: no group
                ->navigationSort(99)
                ->navigationIcon('heroicon-o-finger-print')
                ->slug('sessions')
                ->userAttribute('email'),          // user column, default: name
        ]);
}

All fluent methods are optional. Revoking deletes the session row, so its owner is logged out on the next request; a "remember me" cookie logs them back in, see the core package for details. Masked payload keys and the table/connection are configured in the core package's session-management config.

The resource has no authorization of its own: register it only on panels whose users may see every session, or add a policy for JeffersonGoncalves\SessionManagement\Models\Session.

Configuration

return [
    'navigation' => [
        'group' => null,
        'sort' => null,
        'icon' => 'heroicon-o-finger-print',
    ],
    'resource' => [
        'slug' => 'sessions',
        'user_attribute' => 'name',
    ],
];

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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