Reputation: 7062
I put my CSS file inside public/css
folder. I added CSS file in head section like below.
<link href="{{ url('/css/app.css') }}" rel="stylesheet">
But CSS is not working.
Upvotes: 6
Views: 15239
Reputation: 154
This is working for me in Laravel 8 (make sure your files are in the public folder)
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
Upvotes: 5
Reputation: 406
In Laravel 8, make sure your files are in the public folder and reference them like this:
<link rel="stylesheet" type="text/css" href="{{ url('css/app.css') }}">
Upvotes: 4
Reputation: 1082
Below worked for me.
<link rel="stylesheet" type="text/css" href="{{ URL::to('css/app.css') }}">
Upvotes: 0
Reputation: 1193
I don't see why you can't just use a relative URL like:
<link href="./css/app.css" rel="stylesheet">
Upvotes: 3