summaryrefslogtreecommitdiff
path: root/src/AccessLogServiceProvider.php
diff options
context:
space:
mode:
authorSam Light <sam@lightscale.co.uk>2025-04-09 21:34:16 +0100
committerSam Light <samlight1994@gmail.com>2025-04-09 21:34:16 +0100
commit73083c611f1ddcc41ec712d5f4448df1270bc176 (patch)
treee1762d8c9862b4c97f52923c735ed509ebf3d4c6 /src/AccessLogServiceProvider.php
parent95d4b113c42764a2df09852d31c3bc33e2047d0d (diff)
Created migration, Model, Middleware, config
Diffstat (limited to 'src/AccessLogServiceProvider.php')
-rw-r--r--src/AccessLogServiceProvider.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/AccessLogServiceProvider.php b/src/AccessLogServiceProvider.php
index b6c56c4..aa4b647 100644
--- a/src/AccessLogServiceProvider.php
+++ b/src/AccessLogServiceProvider.php
@@ -6,5 +6,19 @@ use Illuminate\Support\ServiceProvider;
class AccessLogServiceProvider extends ServiceProvider
{
+ public function boot(): void
+ {
+ $ns = "laralight-access-log";
+ $dir = __DIR__;
+ $root = "{$dir}/..";
+ $this->publishesMigrations([
+ "{$root}/database/migrations" => database_path('migrations'),
+ ]);
+
+ $this->mergeConfigFrom("$root/config/access_log.php", 'access_log');
+ $this->publishes([
+ "{$root}/config/access_log.php" => config_path('access_log.php'),
+ ], "{$ns}:config");
+ }
}