Gabriel Stein
Gabriel Stein

Reputation: 478

Laravel 5.1.4 Entrust set up

I have problems with setting up entrust with L5..1.4

this is what i do:

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

and this: ....

'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,

And its not working ... crashes my whole php artisan (when i run php artisan):

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

i used this to install entrust:

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

and then composer update. Now EntrustServiceProvider is under vendor/zizaco/entrust/src/entrust/ ...

any ideas?

Upvotes: 0

Views: 1691

Answers (1)

James Fannon
James Fannon

Reputation: 271

After adding

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

to your composer.json file run:

composer install

Next in the config\app.php add to the providers array:

'Zizaco\Entrust\EntrustServiceProvider',

and under the aliases array add:

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

next run:

php artisan entrust:migration

this will generate the Entrust migration and finally run the migrations:

php artisan migrate

you should now be on your way! For more information check out: https://github.com/Zizaco/entrust

Upvotes: 2

Related Questions