Open danielmmf opened 6 months ago
Description
When running the migrations, an error occurs due to the use of an undefined static property
Spatie\Permission\PermissionRegistrar::$pivotPermission
. This issue prevents the migration from completing successfully.Steps to Reproduce
1. Run `php artisan migrate`.
Error Output
Error
Access to undeclared static property Spatie\Permission\PermissionRegistrar::$pivotPermission
at database/migrations/2023_10_15_113015_create_permission_tables.php:54
Proposed Solution
Replace
PermissionRegistrar::$pivotPermission
with a direct reference to thepermissions
table's primary key, which is usuallyid
.Additional Context
Using the corrected code, the migration will complete successfully.
Don't do that. To as the steps below instead:
And all will work properly.
tnx
Em dom., 16 de jun. de 2024 às 15:05, Samimi @.***> escreveu:
Description
When running the migrations, an error occurs due to the use of an undefined static property Spatie\Permission\PermissionRegistrar::$pivotPermission. This issue prevents the migration from completing successfully. Steps to Reproduce
- Run
php artisan migrate
.Error Output
Error
Access to undeclared static property Spatie\Permission\PermissionRegistrar::$pivotPermission
at database/migrations/2023_10_15_113015_create_permission_tables.php:54 Proposed Solution
Replace PermissionRegistrar::$pivotPermission with a direct reference to the permissions table's primary key, which is usually id. Additional Context
Using the corrected code, the migration will complete successfully.
Don't do that. To as the steps below instead:
1.
composer update
2.
Delete the permission migration
3.
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
4.
php artisan migrate
And all will work properly.
— Reply to this email directly, view it on GitHub https://github.com/webceyhan/filament-demo/issues/52#issuecomment-2171793885, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCANGUWDCVMW4XERW5IKB3ZHXHX3AVCNFSM6AAAAABI3ZD3NOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZRG44TGOBYGU . You are receiving this because you authored the thread.Message ID: @.***>
Description
When running the migrations, an error occurs due to the use of an undefined static property
Spatie\Permission\PermissionRegistrar::$pivotPermission
. This issue prevents the migration from completing successfully.Steps to Reproduce
php artisan migrate
.Error Output
Error
Access to undeclared static property Spatie\Permission\PermissionRegistrar::$pivotPermission
at database/migrations/2023_10_15_113015_create_permission_tables.php:54
Proposed Solution
Replace
PermissionRegistrar::$pivotPermission
with a direct reference to thepermissions
table's primary key, which is usuallyid
.Additional Context
Using the corrected code, the migration will complete successfully.