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(3mo ago)3659.2k↓58.8%4MITPHPPHP ^8.2CI passing

Since Jan 10Pushed 3mo 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 2d 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

55

—

FairBetter than 97% of packages

Maintenance80

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community9

Small or concentrated contributor base

Maturity70

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

107d 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

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

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