Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paginate method error (request) #197

Closed
Gurzhii opened this issue Apr 28, 2016 · 1 comment
Closed

paginate method error (request) #197

Gurzhii opened this issue Apr 28, 2016 · 1 comment

Comments

@Gurzhii
Copy link

Gurzhii commented Apr 28, 2016

Got an issu here, base repository consists method paginate, and it's trying to get request function, which doesn't exist

Laravel version: Laravel Framework version 5.1.11 (LTS)

Error message:

FatalThrowableError in BaseRepository.php line 325:
Fatal error: Call to undefined function Prettus\Repository\Eloquent\request()

Method:

public function paginate($limit = null, $columns = ['*'], $method = "paginate")
    {
        $this->applyCriteria();
        $this->applyScope();
        $limit = request()->get('perPage', is_null($limit) ? config('repository.pagination.limit', 15) : $limit);
        $results = $this->model->{$method}($limit, $columns);
        $results->appends(request()->query());
        $this->resetModel();

        return $this->parserResult($results);
    }
@Gurzhii
Copy link
Author

Gurzhii commented Apr 28, 2016

#183

@Gurzhii Gurzhii changed the title paginate method error paginate method error (request) Apr 28, 2016
@ghost ghost closed this as completed in e67ad08 Jun 23, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant