zepfietje/laravel-seeable
Laravel Seeable adds seen/unseen tracking to your Eloquent models. Attach the trait to let users mark records as seen, check whether an item has been viewed, and query unseen records per user—handy for notifications, activity feeds, and read receipts.
last_seen_at value is the raw input for "user hasn't logged in for 30 days" logic.Consider it when all of the following hold:
composer.json constraints, since the last release was February 2023 and newer Laravel majors are almost certainly unsupported.Look elsewhere (or build in-house) when:
last_seen_at column on every request produces a write per request and can hotspot a row. If you're at meaningful scale, you want throttled writes (e.g., update at most once per N minutes, or via cache/queue). Confirm the package's write strategy before adopting, and expect to modify it either way.To executives: This is a tiny, free (MIT) utility that records when each user was last active, so we can show "last seen" labels and target dormant users with re-engagement campaigns. The capability is real but commodity — the same thing is a few hours of engineering. Important caveat: the project is archived and unmaintained, last shipped in early 2023, with a small user base. My recommendation is not to take it on as a dependency. Instead, have engineering implement the same pattern in-house in about a day, using this code as a reference. That gives us the feature with zero long-term dependency risk and no security or upgrade exposure. Cost is negligible either way; the decision is purely about avoiding orphaned code in our stack.
To engineering: Scope is a last_seen_at timestamp on the users table plus middleware/listener wiring to touch it. Two things to settle before writing code: (1) write throttling — don't issue a DB write on every request; update at most every few minutes, ideally off the request path via cache or queue, to avoid row contention on hot users; (2) column and index design — you'll want an index for "sort users by recency" and dormancy queries. The package is archived and predates current Laravel majors, so treat it as a design reference, not a dependency: read the source, then implement it natively. Also decide explicitly whether you need real presence (WebSockets) — if the product requirement is "online now," a database timestamp won't satisfy it and we should scope that separately.
How can I help you explore Laravel packages today?