Hello Good Developers,
I am using spatie:laravel-permissions
package in my application. I have identical code in local machine and production server.
I am having a strange issue with my production environment.
I cannot find permission
in list of commands in php artisan list
.
When I execute
php artisan permission:cache-reset
it says
There are no commands defined in the "permission" namespace.
I tried following things to fix this issue
Spatie\Permission\PermissionServiceProvider::class,
in app.php providerscomposer update
composer dump-autoload
- Cleared all config and application cache.
- deleted vendors directory and executed
composer install
to reinstall all the packages.
Still its not working.
However when I execute dump-autoload it says Discovered Package: spatie/laravel-permission
I am using Laravel 5.7.28
and spatie/laravel-permission:^2.5
My Local system is working fine and I can see permission
command in the list there.
Please help! I don't know where should I check now.