Uh oh!
There was an error while loading. Please reload this page.
docs: fix singular table names in API guide's withAuthorInfo() method - #10058
Conversation
The `BookModel::withAuthorInfo()` method in the Controller guide uses singular table names (book, author) instead of the plural names (books, authors) created in the Database Setup migration. Fixescodeigniter4#10057
Hi there, AlexRasch! 👋 Thank you for sending this PR! We expect the following in all Pull Requests (PRs).
Important We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works. If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md Sincerely, the mergeable bot 🤖 |
michalsn
commented
Mar 21, 2026
@AlexRasch Please run |
neznaika0
commented
Mar 21, 2026
We talked about it. Many people refer to tables in the singular. For the API too. In the framework, it is usually in the plural, so there were disagreements. |
michalsn
commented
Mar 21, 2026
The fix is valid. Since the tables were created using plural names, we should refer to them accordingly. This is part of the same guide. See the linked issue. |
Uh oh!
There was an error while loading. Please reload this page.
withAuthorInfo() methodUh oh!
There was an error while loading. Please reload this page.
michalsn
commented
Mar 22, 2026
Thank you @AlexRasch |
vini123
commented
Mar 22, 2026
via email
虚幻之物对应着冥冥之路!:《羽》 |
Description
The BookModel::withAuthorInfo() method in the Controller guide uses singular table names (book, author) instead of the plural names (books, authors) created in the Database Setup migration. This updates the method to use the correct plural table names for consistency across the API guide.
Fixes#10057
Checklist: