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 trialJulian Cortes
3,549 PointsClass 'HTML' not found
Im using the HTML class to fix the url of my js with blade syntax but im getting this error. This is the expression {{ HTML::script('js/vendor/modernizr.js') }}
im using laravel 5.1.
Ty
4 Answers
Julian Cortes
3,549 PointsI found the problem!. I wasn't updating composer from the virtual machine so I just 'vagrant ssh' then in the application folder execute 'composer update' and it works.
Thanks
Jaymes Young
36,282 PointsTo anyone who might happen upon this question. Just use 'asset' it's far easier than adding to composer.json then updating files.
David Accomazzo
15,986 Points+1 to this. No use learning outdated functions, right?
manuelpenaloza
Courses Plus Student 10,543 Pointsas you use Laravel 5.1: have you imported/configured the HTML package? If not: check this one http://laravelcollective.com/docs/5.0/html#installation
fyi: Laravel 5.1 does not have this package included on default. The last Laravel version that had this was Laravel 4.2.
Julian Cortes
3,549 PointsOk. I imported the package but Im still getting this error:
Class 'Collective\Html\HtmlServiceProvider' not found
I configured composer.json and app.php files
Laurie Williams
10,174 PointsDid you configure composer.json and app.php on the Virtual Machine?
Victoria Felice
14,760 PointsVictoria Felice
14,760 PointsThanks, Julian Cortes for posting your question and solution! This post really helped me. Also, I noticed that the order listed in docs http://laravelcollective.com/docs/5.1/html does matter. Don't add anything to your config/app.php until after doing 'composer update'.