Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Ability to pass variables into pagination view #364

Closed
pbelyaev opened this issue Jan 8, 2017 · 7 comments
Closed

Ability to pass variables into pagination view #364

pbelyaev opened this issue Jan 8, 2017 · 7 comments

Comments

@pbelyaev
Copy link

pbelyaev commented Jan 8, 2017

That would be cool if there was a possibility to pass variables into pagination view. Somehow like so:

$items->render('vendor.pagination.bootstrap-4', [ 'key' => 'value' ])

It seems nice for me and easy to implement. Anyone else finds that interesting?

@brayniverse
Copy link

Worth a shot if it's easy to implement. What's your use case?

@pbelyaev
Copy link
Author

pbelyaev commented Jan 8, 2017

@brayniverse I would like to pass a route name and make custom pages url like /posts/page/1

@pbelyaev
Copy link
Author

I've just saw this https://laravel.com/api/5.4/Illuminate/Pagination/LengthAwarePaginator.html#method_render and I'm very happy Laravel 5.4 does have the second data argument which I hope will help to pass data into the view.

@pbelyaev
Copy link
Author

@brayniverse
Copy link

Good work @pbelyaev 👍

@pbelyaev
Copy link
Author

@brayniverse actually, it wasn't me. I've just suggested and some of the core developers did that.

@Garbee
Copy link

Garbee commented Jan 24, 2017

It wasn't a core dev. The PR for the feature is here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants