diff --git a/user_guide_src/source/guides/api/code/013.php b/user_guide_src/source/guides/api/code/013.php index d342cf4bfae9..4ae1102385ba 100644 --- a/user_guide_src/source/guides/api/code/013.php +++ b/user_guide_src/source/guides/api/code/013.php @@ -16,7 +16,7 @@ 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'); + ->select('books.*, authors.name as author_name') + ->join('authors', 'books.author_id = authors.id'); } }