Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to put css file in laravel project

Tags:

laravel

I have been searching for an answer to this question with no luck. This is my second day using laravel and I'm trying to create a custom 404 error page. I don't know where/how to include my .css file. Can someone please help me with this?

like image 452
Tyler Obier Avatar asked Nov 29 '15 22:11

Tyler Obier


People also ask

Where do I put CSS files in Laravel?

this folder css or whatever you named it, must be placed inside your public folder. Show activity on this post. Search for Public folder in Laravel. Create css folder (that contains stylesheet files of your project), javascript and Images folder (contains images that you will use in your project).


2 Answers

1. put your CSS file in directory [PUBLIC/CSS]
2. in your FileName.blade.php in file just write :

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

Note Again : Don't Write asset('public/css/article.css') this wrong

like image 75
Ibrahim Ahmed Avatar answered Sep 28 '22 07:09

Ibrahim Ahmed


Place your css files inside public folder and use link tag in html document (or 404 template)

Example

<link rel="stylesheet" type="text/css" href="{{ url('/css/style.css') }}" />
like image 28
Covik Avatar answered Sep 28 '22 07:09

Covik