- How do I install zepfietje/laravel-seeable in a Laravel application?
- Install it with Composer using composer require zepfietje/laravel-seeable, then publish and run the package migration to add the last_seen_at column. Add the Seeable trait to your User model and register the package middleware so authenticated requests update the timestamp. Because the repository is archived, treat the install as vendored source rather than a long-lived dependency and verify it boots cleanly on your Laravel version.
- Does laravel-seeable support Laravel 10, 11, or 12?
- The last release was published on 2023-02-14, which predates several Laravel majors, so its composer.json illuminate/* constraints may block installation on current versions. Even if Composer resolves it, middleware priority changes and model attribute handling can cause quiet misbehavior. Test it in a throwaway branch against your exact Laravel and PHP versions before assuming compatibility.
- Is zepfietje/laravel-seeable still maintained?
- No. The GitHub repository is archived, the last release was 2023-02-14, and it has around 35 stars with a very low health score. There will be no upstream security patches, Laravel-version fixes, or maintainer responses. Most supply-chain policies will flag it automatically, so plan for internal ownership if you adopt it.
- What does the Seeable trait actually do?
- It adds last-seen tracking to an Eloquent model, typically by maintaining a last_seen_at timestamp on the users table. A middleware updates that value on authenticated requests, and the package exposes small scopes or accessors for querying recently active users. It is intentionally narrow: one nullable timestamp per user, not an audit log or presence system.
- How is laravel-seeable different from activity logging packages like spatie/laravel-activitylog?
- Seeable stores only the most recent seen timestamp, so it answers "when was this user last active?" but keeps no history. Activity logging packages record a stream of events with subjects, causers, and properties, which is better for audit trails and feeds. If you need read receipts or per-record viewed history, Seeable's single-timestamp model is not enough.
- Will laravel-seeable work with multiple guards, API tokens, or multi-tenant applications?
- The package almost certainly assumes a single authenticated user guard and writes to a single users table. It does not appear to model per-guard, per-device, per-session, or per-tenant last-seen state, so multi-guard or multi-tenant setups will need customization or a different approach. If your requirement goes beyond one timestamp per user, consider the package out of scope.
- Does laravel-seeable write to the database on every request?
- Yes, the typical middleware flow issues an UPDATE against the users table on each authenticated request, which creates write amplification and row contention on hot user rows. At high traffic, add a cache-based throttle so writes happen at most once every 60 to 300 seconds per user, or move the timestamp to a side table. Also confirm timezone handling so the stored last_seen_at value is consistent with your reporting.
- How do I test last-seen tracking with laravel-seeable?
- Use Laravel's testing helpers: Carbon::setTestNow to freeze time, actingAs to authenticate a user, then hit a route and assertDatabaseHas on the last_seen_at column. Because the package is archived, its own test suite may not run on modern PHPUnit versions, so write your own integration tests around the middleware and trait. Verify that the middleware is actually firing by checking the timestamp changes after an authenticated request.
- Can I use laravel-seeable in production, or should I reimplement it natively?
- If your dependency policy permits archived MIT code, fork or vendor the roughly 50 to 150 lines and own them internally. Otherwise reimplement natively: add an indexed nullable last_seen_at column, a small trait, and a terminable middleware with a cache throttle. The native version takes under an engineer-day and avoids silent compatibility drift on future Laravel upgrades.
- What are good alternatives to laravel-seeable for tracking user last activity?
- The simplest alternative is a native last_seen_at column updated by your own throttled middleware. For richer needs, activity logging packages record event history, Redis or cache-based presence supports online-now indicators, and session or authentication tracking covers per-device scenarios. Many teams already have a last_activity column or session table that satisfies the same requirement without an archived dependency.