diff options
author | Sam Light <samlight1994@gmail.com> | 2025-04-10 00:39:38 +0100 |
---|---|---|
committer | Sam Light <samlight1994@gmail.com> | 2025-04-10 00:39:38 +0100 |
commit | 704e4c63dcf449641c5b98dc5433958554b96a91 (patch) | |
tree | 14bf447d374e58d406446beb81fc75db3a1b0243 /src | |
parent | da5f9ef28c6f8e1721c38ee3c88ef5808c5bf13f (diff) |
Updated auth_log_table seeder
Diffstat (limited to 'src')
-rw-r--r-- | src/AuthLogServiceProvider.php | 3 | ||||
-rw-r--r-- | src/Models/AuthLog.php | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/AuthLogServiceProvider.php b/src/AuthLogServiceProvider.php index 55cc2c2..f104997 100644 --- a/src/AuthLogServiceProvider.php +++ b/src/AuthLogServiceProvider.php @@ -3,6 +3,7 @@ namespace Lightscale\LaralightAuthLog; use Illuminate\Support\ServiceProvider; +use Illuminate\Support\Facades\Event; class AuthLogServiceProvider extends ServiceProvider { @@ -20,5 +21,7 @@ class AuthLogServiceProvider extends ServiceProvider $this->publishes([ "{$root}/config/access_log.php" => config_path('auth_log.php'), ], "{$ns}:config"); + + Event::subscribe(AuthSubscriber::class); } } diff --git a/src/Models/AuthLog.php b/src/Models/AuthLog.php index a5b1280..597888a 100644 --- a/src/Models/AuthLog.php +++ b/src/Models/AuthLog.php @@ -2,6 +2,8 @@ namespace Lightscale\LaralightAuthLog\Models; +use Lightscale\LaralightAuthLog\Enums\Status; + use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Prunable; @@ -27,6 +29,7 @@ class AuthLog extends Model protected function casts(): array { return [ + 'status' => Status::class, 'properties' => 'collection', ]; } |