Replies: 1 comment
-
I ran into the same issue. Thank you for this code snippet to resolve it. I modified it a little bit to get rid of warning message on log viewing page about the assets not being up to date. I just returned a similar check as the original method does as it compares the 2 file contents. I am also using a rootPublicPath function I made to get the full root path to things. This is in my AppServiceProvider.php $this->app->extend(LogViewerService::class, function ($service, $app) {
return new class($service) extends LogViewerService {
public function assetsAreCurrent(): bool
{
return File::get(rootPublicPath('vendor/log-viewer/mix-manifest.json'))
=== File::get(__DIR__.'/../../vendor/opcodesio/log-viewer/public/mix-manifest.json');
}
};
}); I did also have to get rid of the mix() in the blade view and simply reference the same files with just the asset(). Hopefully this can get resolved in the package :) Environment
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Details about assets_path
In projects where the public directory is relocated,
and assets_path is explicitly set in config/log-viewer.php,
the method LogViewerService::assetsAreCurrent() still checks for assets using a hardcoded path:
$publishedPath = public_path('vendor/log-viewer/mix-manifest.json');
This leads to a false negative, even though the assets are present in the correct location.
Temporary Workaround:
We’ve resolved this by extending LogViewerService and overriding assetsAreCurrent() to respect the configured path
Suggested Fix:
It would be great if assetsAreCurrent() could use the configured assets_path instead of relying on a hardcoded location. This would make the package more flexible and compatible with Laravel installations that use custom public directories or deployment setups.
Environment:
Thanks for your great work on this package — it’s incredibly useful and well-designed. Let me know if you'd like help submitting a PR for this fix.
Beta Was this translation helpful? Give feedback.
All reactions