For my admin panel I extract all the assets including the manifest-json.js
to mix.setPublicPath(path.normalize('public/backend/'))
.
All the files get correctly added to the backend folder, and the manifest-json.js
file looks as follows:
{ // all correct here "/js/vendor.js": "/js/vendor.js", "/js/app.js": "/js/app.js", "/css/app.css": "/css/app.css", "/js/manifest.js": "/js/manifest.js" }
the problem is that when using
{{ mix('backend/css/app.css') }}
in my blade-files, it looks in public/manifest-json.js
instead of looking for it in backend/manifest-json.js
.
How can I make sure the right manifest-json.js
file is used?
I had same exception after deployment laravel project to server. It was working perfectly fine on localhost but after lot of research I found a solution. If you encounter this exception on server then you have to bind your public path to public_html
Just go to under the app/Providers, you will find your AppServiceProvider file and inside boot() method make the binding as below.
$this->app->bind('path.public', function() { return base_path().'/../public_html'; });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With