/** * Get Topic models Pager * * @param int $limit Per page limit * @return \Illuminate\Pagination\LengthAwarePaginator */ public static function getTopic($limit = 15) { $Topic = new Topic(); $Topic->builder = $Topic->query(); $Topic->selectCategory(); $Topic->applyFilter(); return $Topic->builder->paginate($limit); }