Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Session Management Laravel Package

jeffersongoncalves/filament-session-management

A Filament plugin for managing user sessions directly from your admin panel. View active sessions, inspect device and IP details, and revoke sessions individually or in bulk. Integrates with Laravel's session driver to give admins control over logged-in users.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install the package with Composer and run the publish step for its config/migrations if the package ships them. This package inspects rows in Laravel's sessions table, so you also need php artisan session:table + migrate and SESSION_DRIVER=database set in .env before anything shows up.
  • Register the plugin/resource in your Filament panel provider (->plugin(SessionInspectorPlugin::make())) — that is the first place to look, because navigation group, slug, and visibility are all configured there.
  • First use case: reproduce a support report. Open Sessions, filter by user_id, sort by last_activity, then click a row. As of 1.0.1 the row now opens a dedicated view page rather than a narrow modal, so you get a routable, linkable URL you can paste into a ticket or share with a teammate.

Implementation Patterns

  • Triage workflow. List page for discovery (filter by user, guard, IP, last_activity window), view page for depth. The dedicated page is the natural place to keep a browser tab open while you poke at the app in another tab and refresh.
  • Reading the view page. The infolist renders in a single column on purpose: session metadata (id, user_id, ip_address, user_agent, last_activity) stacks above the payload. Read top-down — identity, then request context, then the decoded session contents.
  • Payload inspection. Use the payload block to answer concrete questions: is the flash data still queued, is _previous.url pointing where you expect, did the cart key get written, is the auth guard key the one you think it is. Copy the JSON out of the page into your editor or jq for anything beyond a glance.
  • Deep linking. Because the view is a page with its own route, you can link to a specific session from a UserResource relation manager, from an exception notifier, or from a Slack alert. Prefer generating the URL through the resource's getUrl('view', ['record' => $id]) rather than hardcoding the path.
  • Authorization. Gate the resource behind a policy or the plugin's canViewAny/canView callbacks. In production this should typically be super-admin-only; the payload is effectively a dump of user state.
  • Tenancy / multi-guard. If you run multiple guards or a multi-tenant panel, scope the table query and be explicit about which guard's sessions you are showing — otherwise the list mixes admin and end-user sessions and the user_id filter becomes misleading.

Gotchas and Tips

  • Modal → page is a behavioural change, not just cosmetic. Any custom action, test, or bookmark that assumed the record opened in a modal needs revisiting. Conversely, tests that asserted on modal content should now assert on the page, and assertSee on payload text will behave differently because the page renders the full infolist.
  • Single-column infolist is a deliberate override. Filament pages default to two columns; the package forces one so metadata and payload stack. If you add your own schema components to the infolist, do not assume they will sit side-by-side — group related fields into a Section instead of relying on column count.
  • overflow-wrap: anywhere fixes horizontal scrolling, not vertical sprawl. Long unbroken tokens (tokens, base64 blobs, hashed keys) no longer blow out the layout, but a large payload still produces a very tall page. If payloads are routinely huge, trim what you store in the session rather than fighting the CSS.
  • The wrapping rule is opinionated CSS. It applies to the payload JSON block specifically. If you want different typography or a monospace/scrollable container, override it with a custom Filament theme rather than editing vendor views.
  • Payload encoding varies by driver and version. Depending on how the session was written you may see plain JSON, PHP-serialized data, or a base64 blob. Do not conclude "the session is corrupt" until you have confirmed the encoding — decode first.
  • Payloads contain sensitive material. CSRF tokens, flash input (which may include failed login passwords on a badly built form), and internal IDs all live in there. Treat the view page as a privileged screen and be careful with screenshots.
  • Table growth and performance. sessions accumulates rows and the default last_activity index matters once the table is large. Keep Laravel's session lottery/pruning configured, and avoid unfiltered sorts on very large tables — always narrow by user or time window first.
  • Nothing here is a breaking change. 1.0.1 is presentation-only: dedicated view page, single-column infolist, payload wrapping. No API, config key, or database changes to migrate around.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox