PHPackages                             label84/laravel-auth-log - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. label84/laravel-auth-log

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

label84/laravel-auth-log
========================

Log user authentication actions in Laravel.

v1.4.1(2mo ago)3654.0k↓20.7%4MITPHPPHP ^8.2CI passing

Since Jan 10Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Label84/laravel-auth-log)[ Packagist](https://packagist.org/packages/label84/laravel-auth-log)[ RSS](/packages/label84-laravel-auth-log/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (14)Used By (0)

Laravel Auth Log
================

[](#laravel-auth-log)

[![Latest Stable Version](https://camo.githubusercontent.com/a6c9b8285c4d453b05795754bb94e2f440306b41f4b8f8cffd58ecff2c3a33ca/68747470733a2f2f706f7365722e707567782e6f72672f6c6162656c38342f6c61726176656c2d617574682d6c6f672f762f737461626c653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/label84/laravel-auth-log)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/aa21105e7f055b772dbada0455c7b4b49404814bf3374a83867276ece92534a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6162656c38342f6c61726176656c2d617574682d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/label84/laravel-auth-log)[![GitHub Workflow Status](https://camo.githubusercontent.com/a191daf3659734f4e517c141d805e431871fa09a4fb7ce00f35119a2211bda89/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6162656c38342f6c61726176656c2d617574682d6c6f672f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/a191daf3659734f4e517c141d805e431871fa09a4fb7ce00f35119a2211bda89/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6162656c38342f6c61726176656c2d617574682d6c6f672f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)

The `laravel-auth-log` package will log all the default Laravel authentication events (Login, Attempting, Lockout, etc.) to your database. In the config file you can select the events that you would like to log. It will save the event name, email, user id, ip address and user agent to the database. No other configurations are required. This package could be useful for tracking unwanted activity in your Laravel application.

- [Laravel Support](#laravel-support)
- [Installation](#installation)
- [Usage](#usage)
- [Tests](#tests)
- [License](#license)

Laravel Support
---------------

[](#laravel-support)

VersionRelease13.x^1.412.x^1.411.x^1.4Installation
------------

[](#installation)

### 1. Install the package via composer

[](#1-install-the-package-via-composer)

```
composer require label84/laravel-auth-log
```

### 2. Publish the config file and migration

[](#2-publish-the-config-file-and-migration)

```
php artisan vendor:publish --provider="Label84\AuthLog\AuthLogServiceProvider" --tag="config"
php artisan vendor:publish --provider="Label84\AuthLog\AuthLogServiceProvider" --tag="migrations"
```

### 3. Run migration

[](#3-run-migration)

```
php artisan migrate
```

Usage
-----

[](#usage)

In the config file `config/authlog.php` you can (un)comment the events that you'd like to log to your database.

```
// config/authlog.php

return [
    // ...
    'events' => [
        \Illuminate\Auth\Events\Registered::class,
        \Illuminate\Auth\Events\Attempting::class,
        // \Illuminate\Auth\Events\Authenticated::class,
        \Illuminate\Auth\Events\Login::class,
        \Illuminate\Auth\Events\Failed::class,
        // \Illuminate\Auth\Events\Validated::class,
        \Illuminate\Auth\Events\Verified::class,
        // \Illuminate\Auth\Events\Logout::class,
        // \Illuminate\Auth\Events\CurrentDeviceLogout::class,
        // \Illuminate\Auth\Events\OtherDeviceLogout::class,
        \Illuminate\Auth\Events\Lockout::class,
        \Illuminate\Auth\Events\PasswordReset::class,
    ],
];
```

In the same file you can can also change the database connection and table name.

### Enable/disable logging

[](#enabledisable-logging)

You can add the `AUTH_LOG_ENABLED=` to your `.env` file to enable/disable the logging.

```
// .env

AUTH_LOG_ENABLED=true
```

### Table format example

[](#table-format-example)

idevent\_nameemailuser\_idip\_addressuser\_agentcontextcreated\_at1Attempting127.0.0.1Mozilla/5.0 (Windows NT 10.0...2022-01-10 00:00:002Login1127.0.0.1Mozilla/5.0 (Windows NT 10.0...2022-01-10 00:00:00Tests
-----

[](#tests)

```
./vendor/bin/pint
./vendor/bin/phpstan analyse
./vendor/bin/phpunit
```

License
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance88

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community9

Small or concentrated contributor base

Maturity69

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

Recently: every ~216 days

Total

12

Last Release

61d ago

PHP version history (3 changes)v1.0.0PHP ^7.4 || ^8.0

v1.1.1PHP ^8.0

v1.4.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/78c37d1496f19445af6a812d2275c34bbd08dead68aebae70229d7ff0670ed85?d=identicon)[tjardo](/maintainers/tjardo)

---

Top Contributors

[![tjardoo](https://avatars.githubusercontent.com/u/31533540?v=4)](https://github.com/tjardoo "tjardoo (25 commits)")

---

Tags

laravellaravel-package

###  Code Quality

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/label84-laravel-auth-log/health.svg)

```
[![Health](https://phpackages.com/badges/label84-laravel-auth-log/health.svg)](https://phpackages.com/packages/label84-laravel-auth-log)
```

###  Alternatives

[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.8k45.4M309](/packages/spatie-laravel-activitylog)[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[directorytree/metrics

Record metrics in your Laravel application

26027.8k](/packages/directorytree-metrics)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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