Skip to content

Commit 1eb42e2

Browse files
docs: fix singular table names in API guide's withAuthorInfo() method (#10058)
Co-authored-by: John Paul E Balandan <paulbalandan@gmail.com>
1 parent 451b656 commit 1eb42e2

File tree

1 file changed

+2
-2
lines changed
  • user_guide_src/source/guides/api/code

1 file changed

+2
-2
lines changed

user_guide_src/source/guides/api/code/013.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class BookModel extends Model
1616
public function withAuthorInfo()
1717
{
1818
return $this
19-
->select('book.*, author.id as author_id, author.name as author_name')
20-
->join('author', 'book.author_id = author.id');
19+
->select('books.*, authors.name as author_name')
20+
->join('authors', 'books.author_id = authors.id');
2121
}
2222
}

0 commit comments

Comments
 (0)