recent(($params['category'] ?? ''), ($params['limit'] ?? 10));
}
public function recent(string $category, int $limit)
{
$posts = [];
for($i = 0; $i < $limit; $i++) {
$posts[] = [
'title' => 'Title' . $i,
'content' => 'Content' . $i,
'rdate' => date('Y-m-d H:i:s'),
];
}
return view('response/cell/recentPosts', ['posts' => $posts]);
}
}