PHPackages                             aginev/login-activity - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. aginev/login-activity

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

aginev/login-activity
=====================

Track users login activity for Laravel 5

1.0.2(7y ago)713.5k↓50%3MITPHP

Since Feb 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/aginev/login-activity)[ Packagist](https://packagist.org/packages/aginev/login-activity)[ Docs](http://aginev.com)[ RSS](/packages/aginev-login-activity/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Track user login activity in Laravel 5
======================================

[](#track-user-login-activity-in-laravel-5)

This package will subscribe for login and logout events and will log data into database or log files.

Features
--------

[](#features)

- Composer installable
- PSR4 auto loading
- Track user login
- Track user logout
- Write logs in database or log files
- Command for cleaning logs

Requires
--------

[](#requires)

Build only for Laravel Framework 5 only!

Installation
------------

[](#installation)

In terminal

```
composer require aginev/login-activity:1.0.*
```

Add Service Provider to your config/app.php like so

```
// config/app.php

'providers' => [
    '...',
    Aginev\LoginActivity\LoginActivityServiceProvider::class,
];
```

Publish migrations

```
php artisan vendor:publish --provider="Aginev\LoginActivity\LoginActivityServiceProvider" --tag="migrations"
php artisan migrate
```

Optionally you can add login activity command and you will be able to clean your logs.

```
// app/Console/Kernel.php

protected $commands = [
    '...',
    \Aginev\LoginActivity\Commands\LoginActivityClean::class,
];
```

Optionally publish config

```
php artisan vendor:publish --provider="Aginev\LoginActivity\LoginActivityServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

Get logs

```
$logs = \LoginActivity::getLogs()->get();
```

Get latest logs

```
$logs = \LoginActivity::getLatestLogs(100); // number of logs to get or leave empty if you want to use the config value
```

Get login logs

```
$logs = \LoginActivity::getLoginLogs()->get();
```

Get latest login logs

```
$logs = \LoginActivity::getLatestLoginLogs(100); // number of logs to get or leave empty if you want to use the config value
```

Get logout logs

```
$logs = \LoginActivity::getLogoutLogs()->get();
```

Get latest logout logs

```
$logs = \LoginActivity::getLatestLogoutLogs(100); // number of logs to get or leave empty if you want to use the config value
```

Clean log

```
$logs = \LoginActivity::cleanLog(30); // Offset in days
```

Clean the log from terminal

```
php artisan login-activity:clean
```

Custom handler implmentations
-----------------------------

[](#custom-handler-implmentations)

1. Implement \\Aginev\\LoginActivity\\Handlers\\LogActivityInterface in your custom handler.
2. Place custom handler as value in login-activity.log config

Credits
-------

[](#credits)

License
-------

[](#license)

MIT -

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~436 days

Total

3

Last Release

2884d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8341783?v=4)[Atanas Ginev](/maintainers/aginev)[@aginev](https://github.com/aginev)

---

Top Contributors

[![aginev](https://avatars.githubusercontent.com/u/8341783?v=4)](https://github.com/aginev "aginev (17 commits)")

---

Tags

login activitylogin activity for Laravel 5Laravel 5 login activity

### Embed Badge

![Health badge](/badges/aginev-login-activity/health.svg)

```
[![Health](https://phpackages.com/badges/aginev-login-activity/health.svg)](https://phpackages.com/packages/aginev-login-activity)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

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