Closed youyi1314 closed 6 years ago
This issue is resolved with v2.8.1
Thanks @drbyte
@drbyte in v2.9.1
the error is still occurring
Your changes aren't in the release => https://github.com/spatie/laravel-permission/blob/2.9.1/src/helpers.php#L10-L13
Do you want to add this PR or should I?
Thanks,
@drbyte I have had just had the same problem but getting triggered by helpers.php when Spark is installed with Nova and attempting to use https://novapackages.com/packages/vyuldashev/nova-permission to manage things. Below seems to solve it.
function getModelForGuard(string $guard) { return collect(config('auth.guards')) ->map(function ($guard) { if (! isset($guard['provider'])) { return; } return config("auth.providers.{$guard['provider']}.model"); })->get($guard); }
I using Laravel Spark 5.0.1, Laravel 5.5, and now i add this package. when i use tinker command below, it show error on
Undefined index: provider in /home/vhost/mcal/vendor/spatie/laravel-permission/src/Guard.php on line 33
before using tinker i created admin role using artisan
php artisan permission:create-role admin web
Tinker