Skip to content

Commit 8e46f1f

Browse files
docs: update 014.php (#10083)
1 parent 747966a commit 8e46f1f

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/014.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class BookModel extends Model
99
public function withAuthorInfo()
1010
{
1111
return $this
12-
->select('book.*, author.name as author_name')
13-
->join('author', 'book.author_id = author.id');
12+
->select('books.*, authors.name as author_name')
13+
->join('authors', 'books.author_id = authors.id');
1414
}
1515
}

0 commit comments

Comments
 (0)