src/Traits/ApiActions.php
public function index(FilterRequest $request)
    {
        $limit = $request->request->get('limit', 15);
        $limit = ($limit > 49) ? 50 : $limit;
        
        $filter = $this->repository->filter($request);
        
        if ($this->list || $request->request->get('search_type') == 'list') {
            $resources = $filter->get(1000);
        } else {
            $resources = $filter->paginate($limit);
        }
        
        if ($resources->count() < 1) {
            // return $this->notFound();
        }
        
        return $this->success($resources);
    }
public function index(FilterRequest $request)
    {
        $limit = $request->request->get('limit', 15);
        $limit = ($limit > 49) ? 50 : $limit;
        
        $filter = $this->repository->filter($request);
        
        if ($this->list || $request->request->get('search_type') == 'list') {
            $resources = $filter->get(1000);
        } else {
            $resources = $filter->paginate($limit);
        }
        
        if ($resources->count() < 1) {
            // return $this->notFound();
        }
        
        return $this->success($resources);
    }
Display a listing of the resource.
paginate

@return \Illuminate\Http\Response