hbliang/laravel-auth-log

Laravel Auth Log

v0.2.3 2020-10-22 05:07 UTC

This package is auto-updated.

Last update: 2024-04-22 12:45:16 UTC


README

Installation

composer require hbliang/laravel-auth-log

Configuration

php artisan vendor:publish --provider="Hbliang\AuthLog\AuthLogServiceProvider"

Migrate

php artisan migrate

Implement the Authlogable interface and add HasAuthLog trait to your authlogable model.

use Hbliang\AuthLog\Contracts\Authlogable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Hbliang\AuthLog\Traits\HasAuthLog;

class User extends Authenticatable implements Authlogable
{
    use HasAuthLog;
}

Usage

User::find(1)->authlogs;