0
I have a project and I honestly do not know what I did differently, but at the time of opening it, out of the blue all images, files css and javascript are not being referenced.
I’m using the laravel, and referencing as follows:
<link href="{{ asset('/css/bootstrap.css') }}" rel="stylesheet">
When I open the browser console, I come across an error for each image, file css or javascript, of the kind:
Failed to load Resource: the server responded with a status of 404 (Not Found) http://localhost:8000/css/bootstrap.css
The files are inside the folder projeto/laravel/public, how it should be and how it always worked.
I’ve tried going back to previous versions on git but it doesn’t help.
I have tried on another computer but also no results.
Does anyone have any idea what it might be?
Asset goes to the Assets folder that if you are using Variable >= 5 is inside the Resources folder. Try the following
{{ url('/css/bootstrap.css') }}– Miguel
So, I just tested also passing all the files from the public folder to the Resources/Assets folder, even then it doesn’t work. I have also tried url('/css/bootstrap.css'), but to no avail. I even tried URL::Asset(') and url('Assets/'), but nothing. Thanks anyway
– Gabriel Augusto
Do your other routes work normally? It wouldn’t have any impact on your public files?
– Kenny Rafael
Running the app with Artisan? or directly in the public folder?
– Miguel
@Kennyrafael yes, the other routes work normally. I even tried to revert to an older version in git, but I still couldn’t make this problem stop. I thought it might be something in apache, but I didn’t touch it. , yes, php Artisan will do
– Gabriel Augusto
I would like to test it on another server, I do not know if you have a production...some errors in the Standard happened to me only in dev, more than once...
– Kenny Rafael
As you are calling the site, type the address here for example you are experiencing problem?
– novic
I am running it only local, I have no server for now. Testing on another server means testing on another computer, in case?
– Gabriel Augusto
I’m trying the same problem, someone got a solution to the case?
– Bruno Duarte