I am Using Laravel 5.0 , the Form and Html Helper are removed from this version , i dont know how to include external css and js files in my header file. Currently i am using this code.
<link rel="stylesheet" href="/css/bootstrap.min.css"> <!--- css file --->
<script type="text/javascript" src="/js/jquery.min.js"></script>
At first, you have to put your
.css
or.js
files in thepublic
folder of your project. You may create subfolders to it and move the files into the subfolder. Then you have to do the followingsIn my example, I have created two subfolders called css and js. I put all of the
.css
and.js
files in corresponding folders and use them where ever I want them. Thank you and hope this helps you.Place your assets in public directory and use the following
example
First you have to install the Illuminate Html helper class:
Next you need to open /config/app.php and update as follows:
To confirm it’s working use the following command:
To include external css in you files, use the following syntax:
In laravel 5.1,
Where assets folder location is inside public folder
Ok so I was able to figure out for the version 5.2. You will first need to create assets folder in your public folder then put css folder and all css files into it then link it like this :
Hope that helps!
i use this way, don't forget to put your css file on public folder.
for example i put my bootstrap css on
to access from header:
hope this help