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
Laravel Last Seen

Laravel Last Seen Laravel Package

taldres/laravel-last-seen

A lightweight Laravel package for tracking user last-seen timestamps and online status. Record activity, query when users were last active, and display presence indicators with minimal setup and Eloquent-friendly integration. Ideal for dashboards, admin panels, and member directories.

View on GitHub
Deep Wiki
Context7

Track and display the last time a user was active in your Laravel application.

Frequently asked questions about Laravel Last Seen
How do I install and set up taldres/laravel-last-seen in a Laravel application?
Install the package with Composer, publish its configuration, run the migration for the last-seen column or table, and register the tracking middleware. The package is designed for Laravel applications using Eloquent user models. After the v1.6.2 conventions-alignment release, confirm that namespaces, config keys, and published asset locations match the documentation before deploying.
Does laravel-last-seen track user activity automatically or do I need to call a method manually?
Activity tracking is automatic through Laravel middleware, so normal authenticated requests can update presence without explicit calls in your controllers. The package also provides a model trait with helpers for querying last-seen and online state. You still need to register the middleware and configure the tracked model correctly.
How does the package decide whether a user is currently online?
Online status is based on the stored last-seen timestamp and a configurable online threshold. If the user's last activity falls within that threshold, the package's model helpers can report them as online. Tune the threshold to match how frequently your application receives activity.
Can I configure the online threshold and the timestamp column used by laravel-last-seen?
Yes. The package exposes configuration for the online threshold and the timestamp column, and you publish the config during setup. This lets you map the package to an existing last_seen_at-style column where practical instead of maintaining duplicate presence fields.
Which Laravel and PHP versions does taldres/laravel-last-seen support?
The package targets Laravel applications, but you should verify the exact Laravel and PHP constraints in its composer.json and CI matrix for your target runtime. v1.6.2 is described as a maintenance release aligning code and tooling with Laravel conventions. Confirm the CI matrix covers your framework and PHP versions before pinning it in production.
Does laravel-last-seen store presence in the database, cache, or both?
The package is designed to work with Laravel's cache and database drivers, with configuration available for the stored timestamp column. The exact storage backend and any cache/database consistency behavior should be confirmed from the published config and README. Choose the backend that matches your existing presence and retention requirements.
How do I display a user's last seen time, such as "5 minutes ago", in a Blade view?
The package provides Blade-friendly helpers for relative time display, backed by the model trait's last-seen values. Use those helpers in dashboards, admin panels, or member directories rather than formatting timestamps manually. Check the README for the exact helper and method names for your installed version.
Is laravel-last-seen suitable for high-traffic production applications?
It is a lightweight, single-purpose presence package, not a dedicated presence service or analytics platform. Because middleware tracking introduces writes on request paths, the main production concern is write amplification, so review query load and consider throttling or sampling if supported. For very high-volume systems, compare it with Redis, WebSockets, or a dedicated presence service.
How should I handle privacy and GDPR data retention with last-seen tracking?
Last-seen data can be personal data in many jurisdictions, so treat retention, access control, and purpose limitation as application responsibilities. The package is not a compliance or audit platform; document how long timestamps are kept and whether users can request deletion. Review the package documentation for any retention or privacy guidance before production rollout.
What are the alternatives to laravel-last-seen, and is it actively maintained?
Alternatives include custom last_seen_at columns, Redis-backed presence, WebSocket presence services, and broader analytics or session tools. taldres/laravel-last-seen uses a single-maintainer community support model, and v1.6.2 is a maintenance-only release with no prior assessment baseline. Review the changelog from v1.6.0 through v1.6.2 and pin ^1.6.2 only after validating compatibility and support expectations.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo