Skip to content

[11x.] Improved typehints for InteractsWithDatabase#54748

Merged
taylorotwell merged 3 commits into
laravel:11.xfrom
cosmastech:interacts-with-db-typehints
Feb 23, 2025
Merged

[11x.] Improved typehints for InteractsWithDatabase#54748
taylorotwell merged 3 commits into
laravel:11.xfrom
cosmastech:interacts-with-db-typehints

Conversation

@cosmastech

Copy link
Copy Markdown
Contributor

When I'm using the DB helper functions, if it's been a while, I usually have to check if it accepts a table name, a model instance, or a class-string of the Model. I thought I may help others by making the docblocks more explicit.

Technically class-string is a subtype of string, but I think being a bit more explicit is helpful.

Furthermore, I have made the mistake more than once where I thought I could pass a list of associative arrays to see if they all exist. 😅

@taylorotwell taylorotwell merged commit 344c37f into laravel:11.x Feb 23, 2025
@cosmastech cosmastech deleted the interacts-with-db-typehints branch January 24, 2026 13:06
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