If we checkout the latest code and try to create a new setup, it fails with the following error:
"Access to undeclared static property $Spatie\Permission\PermissionRegistrar::$pivotPermission"
This is because of the following line in the database/migrations/2022_06_09_185929_create_permission_tables.php file.
If we checkout the latest code and try to create a new setup, it fails with the following error: "Access to undeclared static property $Spatie\Permission\PermissionRegistrar::$pivotPermission"
This is because of the following line in the
database/migrations/2022_06_09_185929_create_permission_tables.php
file.The issue is due to the updated PermissionProvider library but the migration is using the old api's. One suggested solution is to regenerate the migration: See https://github.com/spatie/laravel-permission/discussions/2576#discussioncomment-8417545 I haven't tried it.
For now the easiest workaround I found was the following:
dc9c8fef599c22e5abd5c5402510f953a17dae7a
composer install
php artisan key:generate
php artisan migrate
php artisan db:seed --class=AdminSeeder
composer install