NilPortugues\Laravel5\JsonApi\Controller\JsonApiTrait::listResourceCallable PHP Method

listResourceCallable() protected method

Returns a list of resources based on pagination criteria.
protected listResourceCallable ( ) : callable
return callable
    protected function listResourceCallable()
    {
        return function () {
            return EloquentHelper::paginate($this->serializer, $this->getDataModel()->query(), $this->pageSize)->get();
        };
    }