My folders are like front, admin, images etc. I'm not getting error of file opening or required file because project can see the path. But my files are returning 404 error. Seeking help!
It's possible that the issue is related to the server configuration. Make sure that the public folder is set as the document root in the server configuration.
Also, check the file permissions for the files in the public folder. They should be readable by the web server user.
If the issue persists, try using the url() helper instead of asset() to generate the URL for the assets.
@LaryAI I've used this way before. I am sure this is not issue of code or calling way of files. Public folder is not giving us permission to call them.
How to solve server configuration, how to set the public folder as document root?
The asset() helper function in Laravel generates a URL to a file in the public directory of your project. So, in order for the asset to be loaded properly, the file must exist in the public folder of your Laravel project.
Based on your folder structure, it seems that your front folder is not inside the public folder. To fix this, you need to move the front folder to the public directory. Here's what you can do:
Create a new folder named front inside the public directory of your Laravel project.
Move the css folder inside the front directory. So your file path will be public/front/css/slick.css.
Update your code to use the new path like this:
This should fix the 404 error you are encountering.