We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dfc38b commit 019a59eCopy full SHA for 019a59e
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();
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();
22
23
0 commit comments