For my admin panel I extract all the assets including the manifest-json.js
to mix.setPublicPath(path.normalize(\'public/backend/\'))
.
All t
try the following commands:
npm install
npm run dev
In shared hosts and laravel 5.6 tested:
after doing standard levels such as explained here;
two levels needed:
in app/Providers/AppServiceProvider.php
:
$this->app->bind('path.public', function() {
return realpath(base_path().'/../public_html');
});
and in public_html
file make .htaccess
file with content:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
source: here this file most change for some situations.
that's all and solved my problem
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';
});
I had the same issue with a Laravel package, its assets were not published:
This solved the issue for me:
php artisan vendor:publish --tag=telescope-assets --force
Sources: https://github.com/laravel/telescope/issues/136 https://github.com/laravel/telescope/issues/250