Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/log-viewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@

'route_path' => 'log-viewer',

/*
|--------------------------------------------------------------------------
| Log Viewer Assets Path
|--------------------------------------------------------------------------
| The path to the Log Viewer assets.
|
*/

'assets_path' => 'vendor/log-viewer',

/*
|--------------------------------------------------------------------------
| Back to system URL
Expand Down
6 changes: 3 additions & 3 deletions resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="csrf-token" content="{{ csrf_token() }}">
<link rel="shortcut icon" href="{{ asset(mix('img/log-viewer-32.png', 'vendor/log-viewer')) }}">
<link rel="shortcut icon" href="{{ asset(mix('img/log-viewer-32.png', config('log-viewer.assets_path'))) }}">

<title>Log Viewer{{ config('app.name') ? ' - ' . config('app.name') : '' }}</title>

<!-- Style sheets-->
<link href="{{ asset(mix('app.css', 'vendor/log-viewer')) }}" rel="stylesheet" onerror="alert('app.css failed to load. Please refresh the page, re-publish Log Viewer assets, or fix routing for vendor assets.')">
<link href="{{ asset(mix('app.css', config('log-viewer.assets_path'))) }}" rel="stylesheet" onerror="alert('app.css failed to load. Please refresh the page, re-publish Log Viewer assets, or fix routing for vendor assets.')">
</head>

<body class="h-full px-3 lg:px-5 bg-gray-100 dark:bg-gray-900">
Expand All @@ -26,6 +26,6 @@
// Add additional headers for LogViewer requests like so:
// window.LogViewer.headers['Authorization'] = 'Bearer xxxxxxx';
</script>
<script src="{{ asset(mix('app.js', 'vendor/log-viewer')) }}" onerror="alert('app.js failed to load. Please refresh the page, re-publish Log Viewer assets, or fix routing for vendor assets.')"></script>
<script src="{{ asset(mix('app.js', config('log-viewer.assets_path'))) }}" onerror="alert('app.js failed to load. Please refresh the page, re-publish Log Viewer assets, or fix routing for vendor assets.')"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/LogViewerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function registerResources()
protected function defineAssetPublishing()
{
$this->publishes([
self::basePath('/public') => public_path('vendor/log-viewer'),
self::basePath('/public') => public_path(config('log-viewer.assets_path')),
], 'log-viewer-assets');
}

Expand Down
Loading