2016-10-23 85 views
0
  1. 我已经包括以下 我有添加到composer.json: “照亮/ HTML”: “5.0 *” 我有添加到app.php提供商数组: b)'Form'=>'Illuminate \ Html \ Html \ HtmlFacade', 'Illuminate \ Html \ HtmlServiceProvider', 我已经添加到app.php别名数组中: a)'Html'=>'Illuminate \ Html \ FormFacade',类HTML未找到laravel 5.0

    当我尝试更新我的作曲家在cmd我得到以下错误可能是什么问题

    C:\xampp>cd\xampp\htdocs\sites\project\laravel\mysitegud 
    
    C:\xampp\htdocs\sites\project\laravel\mysitegud>composer update 
    
    
        [Seld\JsonLint\ParsingException] 
        "./composer.json" does not contain valid JSON 
        Parse error on line 8: 
        ...amework": "5.0.*"   "illuminate/html", " 
        ---------------------^ 
        Expected one of: 'EOF', '}', ':', ',', ']' 
    

下面的下面的代码是composer.json

{ 
    "name": "laravel/laravel", 
    "description": "The Laravel Framework.", 
    "keywords": ["framework", "laravel"], 
    "license": "MIT", 
    "type": "project", 
    "require": { 
     "laravel/framework": "5.0.*" 
     "illuminate/html", "5.0.*" <!--this code is for illuminate--> 

    }, //is there any problem in the following code.i have noticed that laravel is key sensitive .may be i went wrong some where but i dont know where. 

回答

0

require阵列的第二项将被误格式化。键和值之间的分隔符/分离器是:使用JSON,而不是一个简单的,

电流线

"illuminate/html", "5.0.*" 

正确路线

"illuminate/html": "5.0.*" 

现在运行composer update时或composer install取决于您的项目statu秒。它现在应该正确安装HTML和Form插件。

而且不要忘了新的形式和HTML的外观添加到您的aliases

'aliases' => [ 
    // ... 
     'Form' => Collective\Html\FormFacade::class, 
     'Html' => Collective\Html\HtmlFacade::class, 
    // ... 
    ], 

和的ServiceProvider

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

如果要升级到L5,您应该删除旧的声明。

现在运行composer dumpauto,然后是artisan optimize

+0

将行更改为'“illuminate/html”:“5.0。*”'i另一个错误'致命错误:类'Illuminate \ Foundation \ Application'未在C:\ xampp \中找到后,更改为 – harri

+0

。 htdocs \ sites \ project \ laravel \ mysitegud \ bootstrap \ app.php on line 14' – harri

+0

将行更改为“illuminate/html”:“5.0。*”'i another error致命错误:Class'Illuminate \ Foundation \ Application '在第14行找不到C:\ xampp \ htdocs \ sites \ project \ laravel \ mysitegud \ bootstrap \ ap p.php – harri