blob: a509fffa246c50cf3d091669c0c0abe2d316cbab (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
 | <?php
namespace Lightscale\LaralightTables;
use Lightscale\LaralightAssets\Facades\Assets;
use Illuminate\Support\ServiceProvider as ServiceProviderBase;
use Illuminate\Foundation\Console\AboutCommand;
class ServiceProvider extends ServiceProviderBase
{
    public function register() : void
    {
    }
    public function boot() : void
    {
        AboutCommand::add('Laralight Tables', fn() => [
            'Version' => 'dev'
        ]);
        $ns = Service::NAMESPACE;
        $root = __DIR__ . '/..';
        $viewsPath = "{$root}/resources/views";
        $assetsUri = "vendor/{$ns}";
        $assetsPath = public_path($assetsUri);
        $this->loadViewsFrom($viewsPath, $ns);
        $this->publishes([
            $viewsPath => resource_path("views/vendor/{$ns}"),
        ], Service::NAMESPACE . '-views');
        $this->publishes([
            "{$root}/public" => $assetsPath,
        ], "{$ns}-assets");
        Assets::registerManifest($ns, "{$assetsPath}/assets-manifest.json", $assetsUri);
    }
}
 |