简体   繁体   English

Laravel 5,即使更新app.php和config.php后也找不到CLass HTML

[英]Laravel 5 , CLass HTML not find even after updating app.php and config.php

I have updated my Laravel5 with following code 我用以下代码更新了Laravel5

in app.pho 在app.pho中

providers array 
     'Illuminate\Html\HtmlServiceProvider',

    'aliases' => [
            'Form'=> 'Illuminate\Html\FormFacade',
            'HTML'=> 'Illuminate\Html\HtmlFacade',

In Composer 在作曲家中

"require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "illuminate/html": "^5.0"
    },

Then I update the composer with composer update 然后我用作曲家更新来更新作曲家

Still I am getting 还是我越来越

Class 'html' not found

Can any one tell me what else could be wrong 谁能告诉我还有什么问题

Thanks 谢谢

@Vikram Sir..Actually i dont have enough reputation so that i can reply at your comment..so , i am updating my previous answer....sorry for my english.. @Vikram先生..实际上我没有足够的声誉,所以我可以回复您的评论..so,我正在更新我以前的答案..抱歉我的英语..

**In app.php **

in providers array, add- 在提供者数组中,添加-

'Illuminate\Html\HtmlServiceProvider',

in aliases, add 在别名中,添加

'Form'  => 'Illuminate\Html\FormFacade',
'HTML'  => 'Illuminate\Html\HtmlFacade',

now, in composer.json, add 现在,在composer.json中添加

"require": {
    "laravel/framework": "5.1.*",
    "illuminate/html": "~5.0."
    },

use ~ in the place of ^ 用〜代替^

now 现在

on cmd, 在cmd上,

composer update

100% working.. 100%工作..

Looks like your are using lowercase html instead of uppercase HTML 看起来您正在使用小写html而不是大写HTML

Edit: Not that at all, Laravel 5 doesn not support HTML by default, you'll need to: 编辑:根本不是,Laravel 5默认不支持HTML,您需要:

include "illuminate/html": "5.*" in your composer.json composer.json包括"illuminate/html": "5.*"

Add the provider to app.php : 'Illuminate\\Html\\HtmlServiceProvider' 将提供程序添加到app.php'Illuminate\\Html\\HtmlServiceProvider'

Add facades (alias part of app.php) to use HTML instead of the fully qualified name: 'Form'=> 'Illuminate\\Html\\FormFacade', 'HTML'=> 'Illuminate\\Html\\HtmlFacade' 添加外观(app.php的别名)以使用HTML而不是完全限定的名称: 'Form'=> 'Illuminate\\Html\\FormFacade', 'HTML'=> 'Illuminate\\Html\\HtmlFacade'

The answer was very specific to my problem . 答案是针对我的问题的。

I had to change ion my code 我不得不更改代码

from

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

to

{!! Html::style('css/style.css') !!}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM