/** * Gets the latest events. Default to 9. * * @param int $count default 9. the number of events to retrieve * @return Collection the collection of events retrieved. */ public function getLatestEvents($count = 9) { return Event::query()->orderBy('created_at', 'desc')->take($count)->get(); }