类';HTML';在使用bootstrap时未在laravel 5中找到


Class 'HTML' not found in laravel 5 while using bootstrap

我试图将引导程序添加到我的laravel应用程序中,但它无法正常工作。当使用bootstrap创建文本区域时,我可以看到文本区域,但在文本区域下方显示错误:

Whoops, looks like something went wrong.
1/1
FatalErrorException in bd4dbbba0de3e338e8b6884bcb514092774bce38.php line 21:
Class 'HTML' not found
in bd4dbbba0de3e338e8b6884bcb514092774bce38.php line 21

home.blade.php

<!Doctype html>
<html>
    <head>
    <title>
        BloggerFramework    
    </title>

    </head>
    <body>
    <div class="form-group">
        <label for="article">Write something Awesome</label>
        <textarea class="form-control" rows="20" cols="100" id="article"></textarea>
    </div>
    </body> 
    {{ HTML::style('css/bootstrap.min.css')}}
    {{ HTML::style('css/mystyle.css') }}
    {{ HTML::script('js/jquery.min.js') }}
    {{ HTML::script('js/jquery.ui.min.js') }}
    {{ HTML::script('js/bootstrap.min.js') }}
</html>

有人能建议使用laravel应用程序前端的任何最佳实践吗

由于Laravel 5 HTML和Form已从框架中删除,您需要安装Laravel HTML&手动表单。

若您已经安装了这个软件包,但仍然出现相同的错误,请尝试运行composer dumpauto命令。

Laravel 5*Framework已经删除了对Inbuild FORM和HTML的支持。

安装Laravel Collective软件包以获得Form和Html支持。

如果已经安装,请使用Html而不是Html

如果不是,则按照以下步骤操作:

作曲家需要laravelcollective/html/strong>

接下来,将您的新提供者添加到config/app.hp:的提供者数组中

'providers'=>[Collective''Html''HtmlServiceProvider::class,],

最后,将两个类别名添加到config/app.hp:的别名数组中

"别名"=>["窗体"=>Collective''Html''FormFacade::class,'Html'=>Collective''Html''HtmlFacade::class,],

示例:https://laravelcollective.com/docs/5.1/html