Open Zyles opened 8 years ago
+1
+1
+1
+1
+1
+1
how to install in lumen? thank you.
I've got it working in Lumen:
bootstrap/app.php
)vendor/zizaco/entrust/src/Entrust/EntrustServiceProvider.php
to match https://github.com/mauvm/entrust/commit/394dbb71b997538e235fe711ab075d6f765a6736 (as long as my PR isn't merged)Make sure your config/auth.php
looks like this (model
and table
are required by Entrust):
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
'table' => 'users',
],
],
This cache store does not support tagging
make sure you're not using the file
cache provider. Instead set it to array
in .env
or config/cache.php
.If you get errors like App\Role not found
you need to create the Entrust config file. php artisan vendor:publish
doesn't work in Lumen, so copy vendor/zizaco/entrust/src/config/config.php
to config/entrust.php
, modify it, and load it in bootstrap/app.php
. This error occured because my models are in the App\Models
namespace. Therefore I'm also using 'model' => App\Models\User::class
in config/auth.php
.
Hope it helps!
If anyone gets
[Symfony\Component\Console\Exception\CommandNotFoundException] There are no commands defined in the "vendor" namespace.
Add: composer require laravelista/lumen-vendor-publish
And then publish
I trying to use this in my lumen. I follows all guides above.
but now i got error
Class 'Blade' not found
*for now i disabled blade in the Entrust service provider and it fixed
$this->bladeDirectives();
@ihsanberahim You've possibly skipped this part of step 2: https://github.com/mauvm/entrust/commit/394dbb71b997538e235fe711ab075d6f765a6736#diff-fd67755a24979e24a74dd15b4c30d112R62
thanks
@mauvm can you help with my issue here: https://github.com/Zizaco/entrust/issues/806 ?
thanks heaps.
Would be nice.
Thanks.