-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
PHP Version
8.3
CodeIgniter4 Version
4.7
CodeIgniter4 Installation Method
Composer (using codeigniter4/appstarter)
Which operating systems have you tested for this bug?
Windows
Which server did you use?
cli-server (PHP built-in webserver)
Environment
development
Database
Documentation inconsistency: singular vs plural table names in API guide
What happened?
Affected pages:
https://codeigniter.com/user_guide/guides/api/database-setup.html
https://codeigniter.com/user_guide/guides/api/controller.html
Description:
The API guide contains an inconsistency between the Database Setup page and the Controller page when referring to table names.
On the Database Setup page, the migrations create tables using plural names
However, on the Controller page, the withAuthorInfo() method in BookModel uses singular table names in both the select() and join():
public function withAuthorInfo()
{
return $this
->select('book.*, author.name as author_name')
->join('author', 'book.author_id = author.id');
}
Steps to Reproduce
Follow the guide for rest api
Expected Output
Update the guide to use "correct" plural table names or update the migration =)
Anything else?
No response