shamarkellman / auth-logger
Log all authentication events performed with an application
1.0.4
2020-11-25 11:46 UTC
Requires
- php: >=7.0
- illuminate/auth: ~5.5
- illuminate/bus: ~5.5
- illuminate/console: ~5.5
- illuminate/contracts: ~5.5
- illuminate/database: ~5.5
- illuminate/http: ~5.5
- illuminate/notifications: ~5.5
- illuminate/support: ~5.5
This package is auto-updated.
Last update: 2024-10-25 08:50:36 UTC
README
Laravel package to log all authentication events.
Requirements
- PHP >= 7.0
- Laravel >= 5.5
Installation
composer require shamarkellman/auth-logger
Publish assets
php artisan vendor:publish --provider="Shamarkellman\AuthLogger\Providers\AuthLoggerServiceProvider"
Run migrations
php artisan migrate
Usage
Add Shamarkellman\AuthLogger\Traits\AuthLoggable trait to User Models
<?php namespace App; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; use Shamarkellman\AuthLogger\Traits\AuthLoggable; class User extends Authenticatable { use Notifiable, AuthLoggable; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'name', 'email', 'password', ]; /** * The attributes that should be hidden for arrays. * * @var array */ protected $hidden = [ 'password', 'remember_token', ]; }
TODO
- Log authenticated, authenticating
- Tests
Credits
- Shamar Kellman
License
Published under MIT License