Reputation: 427
I need to use a custom css file but I am unable to call from the public/css directory. Is there anything else I need to do?
<link rel="stylesheet" href="{{asset('css/businessfrontpage.css')}}"/>
Upvotes: 1
Views: 714
Reputation: 13669
give 777 permission to public folder and then try to access files
<link rel="stylesheet" href="/css/businessfrontpage.css"/>
Upvotes: 0
Reputation: 62
That should work for the file /public/css/businessfrontpage.css
.
Since it doesn't seem to be working for you, here are a few things you can try/check.
/public/css/businessfrontpage.css
actually exists at that specific path.If you are using Laravel Mix:
npm dev
(or whichever build task you use) and make sure Mix actually generates the right file and in the right path.mix.version()
make sure to use the mix('path/to/file.css')
helper instead of asset('path/to/file.css')
.Upvotes: 0
Reputation: 2222
First, check whether it is loaded or not by opening the developer tools. Second, while developer tools is open, right-click the refresh icon and click on the "Empty cache and hard reload" option. Third, restart laravel server.
Upvotes: 2