Download the PHP package happenv-com/filament-presence without Composer

On this page you can find all versions of the php package happenv-com/filament-presence. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-presence

Filament Presence

![Filament Presence](art/banner.png)

Latest Version Tests PHPStan Quality Total Downloads License

Live "who's on this page" avatars for Filament panels, plus a durable session log (enter/leave timestamps and dwell time) exposed as domain events.

Each page renders a stacked row of avatars next to its heading, updated in real time as users open, leave, or switch away from the page. Built on Laravel broadcasting (Echo presence channels), so it works with Reverb, Pusher, or Ably.

Key features

Requirements

Package Versions
PHP 8.3 – 8.5
Laravel 11, 12, 13 (CI runs 12 and 13)
Filament 4 (^4.11), 5 (^5.6)

The avatars also need a configured Laravel Echo client (window.Echo) backed by Reverb, Pusher, or Ably, with broadcasting authentication set up.

Installation

Install the package via Composer:

The default recorder writes to a presence_sessions table. Publish and run the migration:

[!IMPORTANT] If you have not set up a custom theme and are using Filament Panels, follow the instructions in the Filament docs first.

Add the package's views to your theme's CSS file, so Tailwind generates the classes they use:

Register the plugin on your panel:

That's it — every page in the panel now shows presence avatars. By default member data comes from the authenticated user's getFilamentAvatarUrl() and name.

Configuration

Optionally publish the config:

config/filament-presence.php:

Key Default Description
recorder database Session-log driver: database, activitylog, or null.
table presence_sessions Table used by the database recorder.
default_opt_in true When false, presence is off unless a page opts in.
show_self false Show the current user's own avatar.
max_visible_avatars 5 Avatars shown before collapsing into a +N chip.
avatar_size 22 Avatar diameter in pixels.
heartbeat_interval 30 Client heartbeat cadence (seconds).
stale_after_seconds 90 Server-side cutoff for closing stale sessions.
guard null Auth guard for the log routes (null = default guard).
reload_on_session_expiry true Reload the tab (onto the login screen) once the session has expired. The client always stops its loop and dispatches filament-presence:session-expired on window; switch this off to handle expiry yourself.
middleware ['web', 'auth'] Middleware group for the log routes.
route_prefix filament-presence URL prefix for the log routes.
register_default_channel true Register the bundled presence channel (disable if you register your own).

Usage

How it works

Two decoupled layers:

The two layers are independent: avatars keep working if the log backend is down, and the log stays correct even when the browser never fires beforeunload.

Per-page opt-in

Toggle presence per page with the InteractsWithPresence trait:

Without the trait, pages follow default_opt_in.

Session log & events

The active recorder records every visit and dispatches plain Laravel events you can listen to:

Drivers:

Closing stale sessions

Schedule the cleanup command so ungraceful exits are still closed:

Extension points

Bind your own implementations in a service provider; the package binds defaults with bindIf, so your bindings always win.

Contract / class Purpose Default
Contracts\ResolvesPresenceMember Build the presence payload (id, name, avatar, profile URL) from a user. reads getFilamentAvatarUrl() + name
Contracts\ResolvesPresenceChannel The logical channel name per request (inject a tenant prefix here). filament-presence.{roomKey}
Contracts\DerivesRoomKey Turn a request path into a channel-safe room key. slug + hash of the path
Contracts\PresenceRecorder The session-log backend. selected via recorder config
Models\PresenceSession The Eloquent model for the database recorder. integer key; bind a subclass for UUIDs/custom table

Custom presence channel

The package registers filament-presence.{roomKey} out of the box. To use your own channel (e.g. tenant-namespaced), set register_default_channel to false and register it yourself, delegating authorization to the package:

Then return the matching name from your ResolvesPresenceChannel so the client subscribes to the same channel.

Translations

The indicator's own strings — the "go to their view" link and the fallback name for a member without one — ship in every locale Filament ships:

am ar az bg bn bs ca ckb cs da de el en es et eu fa fi fil fr he hi hr hu hy id it ja ka km ko ku lt lus lv mk mn ms my nb ne nl pl pt pt_BR ro ru sk sl sq sr_Cyrl sr_Latn sv sw tg th tr uk ur uz vi zh_CN zh_HK zh_TW

The app locale picks the language; the page label in the tooltip is the page's own (already translated) title. Publish the files to change a string or add a language:

Development

The suite runs on Testbench with an in-memory SQLite database — no Filament panel required.

Upgrading

Breaking changes and how to migrate are described in UPGRADING for every major version.

Changelog

See CHANGELOG and GitHub releases for what has changed recently.

Contributing

See CONTRIBUTING for details.

Security vulnerabilities

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

Credits

License

The MIT License (MIT). See License File for more information.



All versions of filament-presence with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^4.11 || ^5.6
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package happenv-com/filament-presence contains the following files

Loading the files please wait ...