How to generate a link to CSS file in Laravel

To generate a link to the CSS file you need to use HTML::style() methodIf you are using Laravel 5 you need to install illuminate/html package before using this method. It accepts path to stylesheet file as a parameter.

Must Read: Super Simple Pagination in Laravel 5

Useful Read:

{{ HTML::style('css/style.css') }}

The above code will produce following HTML output,

<link media="all" type="text/css" rel="stylesheet" href="http://example.com/public/css/style.css">

 

Leave a Comment.