Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5: Class 'HTML' not found

I'm just getting started with Laravel. I'm in a controller method and I say:

return \View::make('scrape', $data);

Then in scrape.blade.php I have:

@extends('layouts.master');

Finally, in layouts/master.blade.php I have:

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

And that where things seem to fall apart and I get:

FatalErrorException in 002eb18bb71fd3ec1de058967b799d49 line 6: Class 'HTML' not found

What am I doing wrong? Thanks for your help.

like image 687
NotoriousWebmaster Avatar asked May 06 '15 20:05

NotoriousWebmaster


2 Answers

Searching on google I found this

"By default in Laravel 5.0, Html and Form are not embedded anymore."

You need to add this package to you application.

like image 171
Pawel Bieszczad Avatar answered Nov 04 '22 09:11

Pawel Bieszczad


Please use above links and last change HTML to Html.

eg:

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

to

{{ Html::style('css/bootstrap.min.css') }}. 

its working.

like image 3
shijinmon Pallikal Avatar answered Nov 04 '22 10:11

shijinmon Pallikal