Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions user_guide_src/source/guides/api/code/013.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class BookModel extends Model
*/
public function withAuthorInfo()
{
return $this
->select('book.*, author.id as author_id, author.name as author_name')
->join('author', 'book.author_id = author.id');
return $this
->select('books.*, authors.name as author_name')
->join('authors', 'books.author_id = authors.id');
}
}
Loading