summaryrefslogtreecommitdiff
path: root/src/AccessLogServiceProvider.php
blob: 54f8a39f41e8940e6f606bd37296161ca58c9c55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

namespace Lightscale\LaralightAccessLog;

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', "{$ns}:migrations"),
        ]);

        $this->mergeConfigFrom("$root/config/access_log.php", 'access_log');
        $this->publishes([
            "{$root}/config/access_log.php" => config_path('access_log.php'),
        ], "{$ns}:config");
    }
}