Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create admin-root user #30

Open
qcz-cell opened this issue Jul 12, 2021 · 5 comments
Open

Cannot create admin-root user #30

qcz-cell opened this issue Jul 12, 2021 · 5 comments

Comments

@qcz-cell
Copy link

After I execute the "php artisan admin:assign-role myEmail slug" command, I get an error "WHOOPS! We could not assign user a role because: No query results for model [Designer\Domain\Users\Models\ user]."

The name of my "App" is "Designer".

@miracuthbert
Copy link
Owner

miracuthbert commented Jul 15, 2021 via email

@LawrenceAddo
Copy link

The role definition is not in the script I just installed.

Any advise?

@boardmain
Copy link

boardmain commented Jul 6, 2023

php artisan role:assign [email protected] admin-root. ( i changed with my email )

the result is

Invalid user credentials.

role admin-root is correctly in the roles table

i tried again after creating user via the signup link

and this is the error


  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'permitable_id' in 'field list' (SQL: insert into `user_roles` (`role_id`, `user_id`, `created_at`, `updated_at`, `expires_at`, `permitable_id`) values (2, 1, 2023-07-06 09:34:32, 2023-07-06 09:34:32, ?, ?))

the column is missing in the user_roles table...

something is not updated... the documentation... or the database...

@miracuthbert
Copy link
Owner

miracuthbert commented Jul 6, 2023 via email

@miracuthbert
Copy link
Owner

Some migrations are missing; can be fixed by publishing them

php artisan vendor:publish --tag=laravel-roles-permitable-migrations

Do not forget to run artisan migrate afterwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants