Answer the question
In order to leave comments, you need to log in
css and js not working on hosting, how to fix it?
I uploaded my test site to the hosting and everything seems to be fine, but css and js do not work, I wrote
the paths in different ways:
1 way:
<link href="{{asset('css/style.css')}}" rel="stylesheet" />
<link href="/css/style.css" rel="stylesheet" />
<link href="{{URL::asset('css/style.css')}}" rel="stylesheet" />
Answer the question
In order to leave comments, you need to log in
This problem occurs for everyone who unfolds the lara for the first time on their own. Look where your path goes, write not on index.php, but on server.php, then your paths will knock directly on the public folder, otherwise it will be like you have now, it thinks that the front root is the root of the project folder, and not public folder.
If you are too lazy, then simply transfer the entire contents of the public folder to the root of the project.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question