assets dist
This commit is contained in:
@@ -36,6 +36,8 @@ class LucentServiceProvider extends ServiceProvider
|
||||
public function boot(Router $router): void
|
||||
{
|
||||
|
||||
$manifest = json_decode(file_get_contents(public_path('vendor/lucent/dist/manifest.json')),true);
|
||||
|
||||
$router->aliasMiddleware('lucent.auth', \Lucent\Http\Middleware\AuthMiddleware::class);
|
||||
$router->aliasMiddleware('lucent.guest', \Lucent\Http\Middleware\GuestMiddleware::class);
|
||||
|
||||
@@ -52,11 +54,16 @@ class LucentServiceProvider extends ServiceProvider
|
||||
]);
|
||||
}
|
||||
|
||||
View::share('manifest', $manifest);
|
||||
View::share('image', app()->make(ImageService::class));
|
||||
View::share('file', app()->make(FileService::class));
|
||||
|
||||
$this->publishes([
|
||||
__DIR__ . '/Config/main.php' => config_path('lucent.php'),
|
||||
]);
|
||||
|
||||
$this->publishes([
|
||||
__DIR__.'/../front/dist' => public_path('vendor/lucent/dist'),
|
||||
], 'public');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,14 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title>@yield('title') - Lucent Data Platform</title>
|
||||
@php
|
||||
echo '<script type="module" crossorigin src="http://127.0.0.1:5173/@vite/client"></script>';
|
||||
@endphp
|
||||
<script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>
|
||||
{{-- @php--}}
|
||||
{{-- echo '<script type="module" crossorigin src="http://127.0.0.1:5173/@vite/client"></script>';--}}
|
||||
{{-- @endphp--}}
|
||||
{{-- <script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>--}}
|
||||
<!-- if production -->
|
||||
<link rel="stylesheet" href="/vendor/lucent/dist/{{ $manifest['main.css']["file"] }}" />
|
||||
<script type="module" src="/vendor/lucent/dist/{{ $manifest['main.js']["file"] }}"></script>
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
|
||||
</head>
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title>@yield('title') - Lucent Data Platform</title>
|
||||
<!-- if development -->
|
||||
@php
|
||||
echo '<script type="module" crossorigin src="http://127.0.0.1:5173/@vite/client"></script>';
|
||||
@endphp
|
||||
<script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>
|
||||
{{-- @php--}}
|
||||
{{-- echo '<script type="module" crossorigin src="http://127.0.0.1:5173/@vite/client"></script>';--}}
|
||||
{{-- @endphp--}}
|
||||
{{-- <script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>--}}
|
||||
<!-- if production -->
|
||||
{{-- <link rel="stylesheet" href="/assets/{{ manifest['main.js'].css }}" />
|
||||
<script type="module" src="/assets/{{ manifest['main.js'].file }}"></script> --}}
|
||||
<link rel="stylesheet" href="/vendor/lucent/dist/{{ $manifest['main.css']["file"] }}" />
|
||||
<script type="module" src="/vendor/lucent/dist/{{ $manifest['main.js']["file"] }}"></script>
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user