0๐
โ
I answer myself.
I hope this doesnt affect my status. Please administrators let me knowโฆ
After modify I need changing .htaccess like this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(css|js|images)/(.*)$ public/$1/$2 [L,NC]
In this way the static files components will not be ignored. Like this components work again
0๐
Let me share my experience.
Inside public folder, there is .htaccess file.
You can copy it into project directory.
And in vendor/laravel/src/Illuminate/Foundation/Helpers.php, change asset file like this.
function asset($path, $secure = null)
{
return app('url')->asset("public/".$path, $secure);
}
It is some bad of touching src file, but it is working well always.
Hope it would help you.
Source:stackexchange.com