2015-07-05 81 views
0

我與L5..1.4Laravel 5.1.4委託設立

委託設立的問題,這是我做的:

/* 
     * Application Service Providers... 
     */ 
     App\Providers\AppServiceProvider::class, 
     App\Providers\EventServiceProvider::class, 
     App\Providers\RouteServiceProvider::class, 
     Zizaco\Entrust\EntrustServiceProvider::class, 

和這樣的:....

'Storage' => Illuminate\Support\Facades\Storage::class, 
     'URL'  => Illuminate\Support\Facades\URL::class, 
     'Validator' => Illuminate\Support\Facades\Validator::class, 
     'View'  => Illuminate\Support\Facades\View::class, 
     'Entrust' => Zizaco\Entrust\EntrustFacade::class, 

而且它不工作...崩潰我的整個PHP工匠(當我運行PHP的工匠):

[Symfony\Component\Debug\Exception\FatalErrorException] 
    Call to undefined method Illuminate\Foundation\Application::bindShared() 

我用它來安裝委託:

"zizaco/entrust": "dev-laravel-5" 

,然後作曲家更新。現在EntrustServiceProvider在供應商/ zizaco/entrust/src/entrust/...

有什麼想法嗎?

composer install 

接下來在config \ app.php添加到供應商陣列:

'Zizaco\Entrust\EntrustServiceProvider', 

+0

您可以運行composer dump-autoload並重試。 – MaXi32

回答

2

加入

"zizaco/entrust": "dev-laravel-5" 

您composer.json文件運行後在別名陣列下添加:

'Entrust' => 'Zizaco\Entrust\EntrustFacade', 

下一次運行:

php artisan entrust:migration 

這將產生委託遷移和最後執行的遷移:

php artisan migrate 

你現在應該在您的方式!要了解更多信息,請訪問: https://github.com/Zizaco/entrust