Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Brian van Vlymen
12,637 PointsDynamic styles with Blade
I am trying to Dynamic styles with Blade on my web server is http://localhost/laravel/ch.1IntegratingFrontEndComponentsWebApp/public/1home.
I want to clean on my layout.blade.php out. I want my style tag move into my public folder.
In my public file in css/socialiconfooter.css.
I have tried both
<link rel"stylesheet" href="css/socialiconfooter.css" />
and
<link rel"stylesheet" href="{{ asset ('css/socialiconfooter.css') }}" />
Do you have any idea? why its not working?
2 Answers
Dustin Matlock
33,856 PointsCan you try:
{{ URL::asset('css/socialiconfooter.css'); }}
or
{{ HTML::style('css/socialiconfooter.css'); }}
Brian van Vlymen
12,637 PointsI have noticed {{ HTML::style('css/socialiconfooter.css'); }} does not work I though It would work since its a static but I tried the first one its working.
is that weird?
Dustin Matlock
33,856 PointsGreat!