Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Migration Error Report


I am encountering an error during the migration process:

2023_06_11_075700_create_permission_tables ................................................... 89.03ms FAIL
Error Details

Access to undeclared static property Spatie\Permission\PermissionRegistrar::$pivotPermission

at database/migrations/2023_06_11_075700_create_permission_tables.php:54
50â–• }
51â–• });
52â–•

Please let me know if you need any further assistance or details.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi Samuel Olavo

There's an update from the Laravel Permission library. To resolve the issue, please follow these steps:

Update the package:

composer update


Remove the old migration file:
Delete the file named *_create_permission_tables.php.

Publish the updated migration file:
Run the command:

php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"


Now, try running the migration again with:

php artisan migrate


These steps should resolve the error you're encountering.

Best regards,


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(