We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae0eb2f commit 79f51a8Copy full SHA for 79f51a8
user_guide_src/source/tutorial/news_section.rst
@@ -98,7 +98,7 @@ some additional tools to make working with data simpler. Add the
98
following code to your model.
99
100
.. literalinclude:: news_section/002.php
101
- :lines: 11-18
+ :lines: 11-23
102
103
With this code, you can perform two different queries. You can get all
104
news records, or get a news item by its slug. You might have
user_guide_src/source/tutorial/news_section/002.php
@@ -8,6 +8,11 @@ class NewsModel extends Model
8
{
9
protected $table = 'news';
10
11
+ /**
12
+ * @param false|string $slug
13
+ *
14
+ * @return array|null
15
+ */
16
public function getNews($slug = false)
17
18
if ($slug === false) {
0 commit comments