ghost2092000
ghost2092000

Reputation: 377

Where should I place my CSS styles for individual views in Laravel project?

I am new to Laravel and was wondering where I should put each css files for my views. I want to keep them separate and don't to have my styles in one file. Also, how would I be able to access them in those views? I tried using <link rel="stylesheet" type="text/css" href="{{ url('/css/style.css') }}" /> but nothing changed in my view. The path where I have my file is storage/public/css/style.css

Upvotes: 0

Views: 220

Answers (2)

Sujata Kalita
Sujata Kalita

Reputation: 49

<link rel="stylesheet" href="{{asset("css/style.css")}}">

used this code,here asset link to your public folder and put your style sheet in /public/css/style.css

Upvotes: 0

Lance
Lance

Reputation: 3213

If your link is <link rel="stylesheet" type="text/css" href="{{ url('/css/style.css') }}" /> change it to <link rel="stylesheet" type="text/css" href="/css/style.css" /> and put your style sheet in /public/css/style.css

Upvotes: 1

Related Questions