Laravel 5 Form未发现致命错误

时间:2015-11-06 10:42:56

标签: laravel laravelcollective

我已经完成了以下解决错误的过程。

- 我已经将“illuminate / html”:“5. *”添加到composer.json并运行“composer update” - 我在config / app.php中添加了以下内容        'Illuminate \ Html \ HtmlServiceProvider',

$array = Array ( 0 => Array ( "START" => "COI-COK", "RETURN" => "CAI - DEL"), 1 => Array ( "START" => "COK - AMM","RETURN" => "CAI - DEL" ),2=> Array ( "START" => "COK - AMM","RETURN" => "CAI - DEL" ) );

$old_start = "";
$old_return = "";
foreach($array as $ak=>$av){
    if(empty($old_start)){
        $old_start = $av['START'];
        $old_return = $av['RETURN'];
    }else{
        if($old_start == $av['START'] && $old_return == $av['RETURN']){
            echo "SAME\n";
        }else{
            echo "Varies\n";
        }

        $old_start = $av['START'];
        $old_return = $av['RETURN'];
    }
}

//Output 
Varies //key 1 will not match with key 0 value
Same   // key 2 will not match with key 1 value

- 但是我的整个项目都没有工作。没有运行。它似乎是作曲家问题。 请帮忙。

1 个答案:

答案 0 :(得分:2)

如果我是正确的,lalavel 5中不再支持illuminate/html包。在laravelcollective/html有一个社区分支,请参阅site查看所有文档。

您可以将照明包换成laravelcollective包:

添加到您的composer.json:

"require": {
    "laravelcollective/html": "5.1.*"
}

将提供程序添加到config / app.php的providers数组中:

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

将两个类别名添加到config / app.php:

的别名数组中
'aliases' => [
    'Form' => Collective\Html\FormFacade::class,
    'Html' => Collective\Html\HtmlFacade::class,
],