From 8a092185e9b3f10b30043dd968d457cca1c905fd Mon Sep 17 00:00:00 2001
From: Sam Light <samlight1994@gmail.com>
Date: Thu, 10 Apr 2025 00:53:23 +0100
Subject: Make possible to disable auth log

---
 src/AuthLogServiceProvider.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/AuthLogServiceProvider.php')

diff --git a/src/AuthLogServiceProvider.php b/src/AuthLogServiceProvider.php
index 0748f34..2c1e177 100644
--- a/src/AuthLogServiceProvider.php
+++ b/src/AuthLogServiceProvider.php
@@ -22,6 +22,9 @@ class AuthLogServiceProvider extends ServiceProvider
             "{$root}/config/auth_log.php" => config_path('auth_log.php'),
         ], "{$ns}:config");
 
-        Event::subscribe(AuthSubscriber::class);
+
+        if (config('auth_log.enabled')) {
+            Event::subscribe(AuthSubscriber::class);
+        }
     }
 }
-- 
cgit v1.2.3