From 704e4c63dcf449641c5b98dc5433958554b96a91 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Thu, 10 Apr 2025 00:39:38 +0100 Subject: Updated auth_log_table seeder --- src/AuthLogServiceProvider.php | 3 +++ src/Models/AuthLog.php | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src') 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', ]; } -- cgit v1.2.3