Working on a new project in Laravel 4 (a.k.a Illuminate) I'm trying to create the link to the style sheet in my master.blade.php
template like so:
{{ HTML::style('css\style.css') }}
But this throws an error saying the class HTML wasn't found. Has it been removed or renamed in Laravel 4, or am I forgetting anything else?
The generator type classes such as HTML:: and Form:: have been removed from L4 for best practice reasons. It would be better to render as tag using the path() method to link the attribute :
<link href="{{ path('to/my/style.css') }}" />
They may be added in later for backwards compatibility, we will see. Please remember that L4 is currently in an alpha state.
Thanks! Dayle Rees.
They just bring it back in Apr 02, 2013, But use Html
instead HTML
eg. {{ Html::style('css\style.css') }}
(now they change it again, this is not working anymore)
Refer: Add missing HTML::script and HTML::style
for now please use this {{ HTML::style('css\style.css') }}
Refer: Updates for the rename of the HTML
facade.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With