/** * Get all categories ordered by their popularity. * * @return \Illuminate\Support\Collection */ public function getAllOrderByPopularity($descending = true) { return $this->model->popular($descending)->get(); }