We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b6c3977 + e1b8599 commit fbb9c4dCopy full SHA for fbb9c4d
2 files changed
user_guide_src/source/outgoing/view_cells/018.php
@@ -10,6 +10,6 @@ class RecentPostsCell extends Cell
10
11
public function mount()
12
{
13
- $this->posts = model('PostModel')->getRecent();
+ $this->posts = model('PostModel')->orderBy('created_at', 'DESC')->findAll(10);
14
}
15
user_guide_src/source/outgoing/view_cells/019.php
@@ -17,6 +17,7 @@ public function mount(?int $categoryId)
17
$categoryId,
18
static fn ($query, $categoryId) => $query->where('category_id', $categoryId)
19
)
20
- ->getRecent();
+ ->orderBy('created_at', 'DESC')
21
+ ->findAll(10);
22
23
0 commit comments