Thứ Bảy, 1 tháng 10, 2016

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


Laravel 5 Tutorial - More issuse have found in Laravel project like "bindShared()" method. Last week ago, i got some problem when create laravel project, the problem look like this "Call to undefined method Illuminate\Foundation\Application::bindShared()" How fix this problem?

Just followed this tutorial step by step, Fist you need to remove this outdated package (taken out of the core and no longer supported).

Begin by installing this package through Composer. Edit your project's composer.json file to require laravelcollective/html

"illuminate/html": "^5.0"

Replace with

"laravelcollective/html": "5.3.*"

When you edit your composer.json file with newer, you need to also edit its service providers and aliases. So, if you open up config/app.php, you will see a providers and aliases section. Remove these lines of code if you haven't done so already.

// providers
'IlluminateHtmlHtmlServiceProvider'

// aliases
'Form'=> 'IlluminateHtmlFormFacade',
'HTML'=> 'IlluminateHtmlHtmlFacade',

Replace with this to your providers array:

'providers' => [
    // ...
    CollectiveHtmlHtmlServiceProvider::class,
    // ...
  ],

and this to your aliases array:

'aliases' => [
    // ...
      'Form' => CollectiveHtmlFormFacade::class,
      'Html' => CollectiveHtmlHtmlFacade::class,
    // ...
  ],

See you next lessons..

Không có nhận xét nào:

Đăng nhận xét