我在设置委托L5..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在vendor / zizaco / entrust / src / entrust / ...下
任何想法?
答案 0 :(得分:2)
添加
后"zizaco/entrust": "dev-laravel-5"
到你的composer.json文件运行:
composer install
接下来在config \ app.php中添加到providers数组:
'Zizaco\Entrust\EntrustServiceProvider',
并在别名数组下添加:
'Entrust' => 'Zizaco\Entrust\EntrustFacade',
下一次运行:
php artisan entrust:migration
这将生成Entrust迁移并最终运行迁移:
php artisan migrate
你现在应该在路上了!有关更多信息,请查看: https://github.com/Zizaco/entrust