docs: fix singular table names in API guide's withAuthorInfo() method#10058
docs: fix singular table names in API guide's withAuthorInfo() method#10058AlexRasch wants to merge 1 commit intocodeigniter4:developfrom
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. Fixes codeigniter4#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 🤖 |
|
@AlexRasch Please run |
|
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. |
|
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. |
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: