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

[9.x] Remove extra code in Model.php to optimize performance πŸƒπŸ»β€β™‚οΈ #45476

Merged
merged 2 commits into from
Jan 2, 2023

Conversation

imanghafoori1
Copy link
Contributor

@imanghafoori1 imanghafoori1 commented Jan 1, 2023

First Commit:

  • The whereKey method can accept an array of ids so the check is not really needed.
  • It also kinda optimizes since the whereKey method now uses the whreIntegerInRaw (instead of whereIn) for numeric ids.

Second commit:

  • The second commit converts anonymous function to arrow functions.

@imanghafoori1 imanghafoori1 changed the title [9.x] Remove extra code in Model.php [9.x] Remove extra code in Model.php to optimize performance Jan 2, 2023
@taylorotwell taylorotwell merged commit b1b6607 into laravel:9.x Jan 2, 2023
@imanghafoori1 imanghafoori1 deleted the restoration branch January 2, 2023 16:28
@imanghafoori1 imanghafoori1 changed the title [9.x] Remove extra code in Model.php to optimize performance [9.x] Remove extra code in Model.php to optimize performance πŸƒπŸ»β€β™‚οΈ Jan 10, 2023
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