PHPackages                             lopatin96/laravel-user-online - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lopatin96/laravel-user-online

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lopatin96/laravel-user-online
=============================

Laravel user online

1.0.1(2y ago)07.9kMITPHPPHP &gt;=8.0

Since May 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/lopatin96/laravel-user-online)[ Packagist](https://packagist.org/packages/lopatin96/laravel-user-online)[ RSS](/packages/lopatin96-laravel-user-online/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Install
=======

[](#install)

### Migrations

[](#migrations)

Run migrations to create the necessary tables.

```
php artisan migrate
```

### Middleware

[](#middleware)

Add LastUserActivity middleware to middleware array in *app/Http/Kernel.php*:

```
protected $middlewareGroups = [
    …
    \Atin\LaravelUserOnline\Http\Middleware\LastUserActivity::class,
];
```

### Trait

[](#trait)

You cant optionally add **HasOnline** trait to User model to get the online status of the user.

```
use Atin\LaravelUserOnline\Traits\HasOnline;

class User extends Authenticatable
{
    use HasOnline, …
```

don't forget to cast last\_seen\_at property to datetime in your User model:

```
protected $casts = [
    …
    'last_seen_at' => 'datetime',
];
```

and then you can check the online status:

```
auth->user()->isOnline();
```

Publishing
==========

[](#publishing)

### Migrations

[](#migrations-1)

```
php artisan vendor:publish --tag="laravel-user-online-migrations"
```

### Config

[](#config)

```
php artisan vendor:publish --tag="laravel-user-online-config"
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~284 days

Total

2

Last Release

803d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ed7ade2d44e2f66eedf7dec7136ca591145f77d8192bdd789e04797c575d0f3?d=identicon)[Vladyslav Lopatin](/maintainers/Vladyslav%20Lopatin)

---

Top Contributors

[![lopatin96](https://avatars.githubusercontent.com/u/18104593?v=4)](https://github.com/lopatin96 "lopatin96 (7 commits)")

### Embed Badge

![Health badge](/badges/lopatin96-laravel-user-online/health.svg)

```
[![Health](https://phpackages.com/badges/lopatin96-laravel-user-online/health.svg)](https://phpackages.com/packages/lopatin96-laravel-user-online)
```

###  Alternatives

[asantibanez/livewire-resource-time-grid

Laravel Livewire resource time grid component

2298.1k](/packages/asantibanez-livewire-resource-time-grid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
