I'm having trouble with importing a css style sheet located in public/css in a blade file located in resources/views/includes.
The code I used in the blade file is
{{ HTML::style('css/layout.css') }}
which didn't work. I also tried
{{ HTML::style('css/layout.css', array('media' => 'print')) }}
The error I get is Class 'HTML' not found
I followed the steps in this question, so
- I added "laravelcollective/html": "5.4.16" in composer.json
- run composer update
added in config/app.php
'providers' => [ CollectiveHtmlHtmlServiceProvider::class, ]
and
'aliases' => [ 'Form' => CollectiveHtmlFormFacade::class, 'HTML' => CollectiveHtmlHtmlFacade::class, ]
Now the error I get is
Class 'CollectiveHtmlHtmlServiceProvider' not found
And I don't understand why, as I added it to app.php. Indeed, when I go to app.php and the line where I added Collective.., the "Html" is colored in red and when I hover over it it says
Undefined namespace Html
What should I do about it? All this laravel thing is getting confusing to me.
Apart from the fact that I don't know what to do with,
{{HTML::linkAction('MemberController@show', 'view', array($value->id))}}
i found nothing online regarding the arguments of "linkAction"
See Question&Answers more detail:os