Laravel failed to load resource, the resource serve r responded with a status of 404

144 Views Asked by At

I downloaded my laravel project from live serve (shared hosting) to local hosting because I want to make some changed in the code. I added a new index.php file to the public folder and run composer update and composer install commands and managed to run the project on local server (I use Laragon server on windwos). However, the project can not upload the resource. The resource are located in the public floder and linked using {{asset}} function and {{assetversion}} methods. Honestly, I do not know about the use of version. The code in like that

<link rel="stylesheet" href="{{ asset('public/frontend/infixlmstheme') }}/css/fontawesome.css{{assetVersion()}} ">
<link rel="stylesheet" href="{{asset('public/backend/css/themify-icons.css')}}{{assetVersion()}}"/>
<link rel="stylesheet" href="{{ asset('public/frontend/infixlmstheme') }}/css/flaticon.css{{assetVersion()}}">
<link rel="stylesheet" href="{{ asset('public/frontend/infixlmstheme') }}/css/nice-select.css{{assetVersion()}}">
<link rel="stylesheet" href="{{ asset('public/frontend/infixlmstheme') }}/css/notification.css{{assetVersion()}}">
<link rel="stylesheet" href="{{ asset('public/frontend/infixlmstheme/css/mega_menu.css') }}">

When I check the path in chrom dev tools, the link points to the right folder (except the version in not in the file name). such as <link rel="stylesheet" href="http://127.0.0.1:8000/public/frontend/infixlmstheme/css/fontawesome.css?v=5.0.0 ">

and the folder in with same path starting from public.

However, the recourse is not connected and the error massage is shown in the attached image fro chrom dev tools. enter image description here

I appreciate you help guys and thank you in advance for your time and expertise.

I have assempution the error is from {{assetversion}} but I could not find the version in the file name. I do not know a lot about the frontend how the asset version work.

0

There are 0 best solutions below