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

Don't use hardcoded primary key name #338

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

danswiser
Copy link
Contributor

@danswiser danswiser commented Feb 17, 2024

Not all User models use 'id' as the primary key. For example, mine is 'uuid'.

Using ->getKey() automatically gets the primary key value for us to use in the options table.

Not all User models use 'id' as the primary key.
For example, Mine is 'uuid'. 
`->getKey()` automatically gets the primary key value for us.
Copy link

what-the-diff bot commented Feb 17, 2024

PR Summary

  • Updated Method for Retrieving User ID in MakeShieldSuperAdminCommand.php
    The code has been updated to utilize the getKey() method instead of the getAttribute('id') method. This change streamlines the process of retrieving the User ID and may enhance the efficiency of the system.

@bezhanSalleh bezhanSalleh merged commit 6819839 into bezhanSalleh:3.x Mar 28, 2024
1 check passed
@bezhanSalleh
Copy link
Owner

Thanks.

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

Successfully merging this pull request may close these issues.

2 participants