Call to undefined method Illuminate\Foundation\Application::bindShared()

后端 未结 5 1479
迷失自我
迷失自我 2021-02-19 01:05

I\'ve just upgraded Laravel from 5.0 to 5.1.

I get this error:

Call to undefined method Illuminate\\Foundation\\Application::bindShared()
5条回答
  •  鱼传尺愫
    2021-02-19 01:46

    I am Rails developer & new to laravel & its just my first day and got stuck in this Form Builder issue. I have gone through many discussions and posts but got my solution on https://laravelcollective.com/docs/5.0/html To use blade form builder (Form::open) we need to change our composer.json and add "laravelcollective/html": "~5.0" in the require block. Then run composer update because then only new dependencies will be available to your project. Now add 'Collective\Html\HtmlServiceProvider', inside config/app.php inside providers block also you need to add

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

    inside config/app.php in aliases block.

    run php artisan serve Enjoy Form builder with blade engine.

提交回复
热议问题