Questions tagged [laravel-pagination]

Using pagination in Laravel Framework

197 questions
0
votes
1 answer

Method render does not exist

I am trying to render my view but i got error its says Method render does not exist . (View: my view is @foreach($forumindex->forumindex()->paginate(2) as $comment)

{{ $comment->comment }}

@endforeach {!!…
Sid Heart
  • 743
  • 3
  • 14
  • 38
0
votes
1 answer

Laravel Pagination works only on the first page

Code in this function is executed by ajax call. I have pagination like this: { $id=$_GET['data']; User::where('votes', '>', $id)->paginate(15); } It works fine on the first page, however on the second page it does not find the…
0
votes
1 answer

How to force Restangular's getList to work with Laravel 5's pagination object?

I have a page where I want to display user's posts paginated. For back-end I use Laravel's resource controllers and on the front-end Restangular services. So back-end implementation looks like this: // url is /users/0/posts public function…
0
votes
1 answer

Pagination with perpage data selection

I'm using pagination and I didn't find the option to show data per page like 15 30 60 120. Is there any way to get the per page selection filed with laravel pagination, if no then please suggest me any altenate.
Mr. Tomar
  • 355
  • 3
  • 5
  • 22
0
votes
1 answer

Laravel 5 unable to render pagination

I'm new to Laravel 5 and I have an issue displaying pagination. I looked in the documentation and just can't get it to work. usercontroller: public function getIndex() { $users = User::where('active', '=','verified')->simplePaginate(10); …
user3813360
  • 566
  • 9
  • 25
0
votes
1 answer

Laravel infinite scroll for pagination output

I'm new to laravel and I'm working on a project based on laravel version 4.2. I've got some problems with loading more results using scroll instead of default pagination. I know there are jQuery plugins that can help me out in this, but none of them…
Sepehr GH
  • 1,297
  • 1
  • 17
  • 39
0
votes
1 answer

Laravel5 default pagination

I have an error when simply put this ->paginate(15); what is wrong with my code below
Muhaimin
  • 1,643
  • 2
  • 24
  • 48
0
votes
0 answers

laravel5 ajax page pagination,how to change the button url

I use ajax to implement pagination. But I don't know how to change the Laravel pagination button href. Next page button always links to page 2. My ajax code is below: $('.pagination a').on('click', function (event) { event.preventDefault(); …
guanyue
  • 445
  • 1
  • 4
  • 11
0
votes
1 answer

How to Paginate Eloquent query with haversine formula

I'm doing a search query by distance and search term, but when using "Having" in eloquent, the standard pagination no longer works. Here is my code: $haversine = '( 3959 * acos( cos( radians(?) ) * cos( radians( latitude ) ) * cos( radians(…
Andy
  • 25
  • 5
0
votes
2 answers

Laravel loading two models into one list

I have 3 models: User - have many Comments Article - belongs to User Comment - belongs to User, Article In user profile I would like to show all paginated actions of given user. What is best and most effective way to do it?
0
votes
1 answer

Custom Pagination

I'm following the tutorial here in the docs: Custom Presenters But where do I place the Zurb Presenter class in my file system and how do I let Laravel know it exists?
panthro
  • 22,779
  • 66
  • 183
  • 324
0
votes
1 answer

Laravel4 pagination is stuck

I have a quite-complex query with lots of joins and wheres via Eloquent instance which starts with $user = new User; $query =User::join('table','users.id','=','table.id'); After that i'm looping and adding lots of ->whereRaw() entries. In the end…
Broshi
  • 3,334
  • 5
  • 37
  • 52
-1
votes
0 answers

Laravel Pagination meta links not returning expected label after upgrading to laravel 10

Just upgraded to Laravel 10 and I found that the links in the meta response are not correctly populating with the expected string. I am using this package. In the Laravel framework there is a class Illuminate\Pagination\LengthAwarePaginator that has…
Kevin Pimentel
  • 2,056
  • 3
  • 22
  • 50
-1
votes
1 answer

I want make a list with numbers

I want to make a list with numbers for example ( 1. lorem 2. ipsum 3 ...) I have pagination in the list. I'm trying to get an index from an array @foreach ($items as $index => $item)
  • $index + 1
  • @endforeach This works, but…
    -1
    votes
    2 answers

    Eager Loading with Pagination

    I have a a group instance I want to eager load with pagination: public function show(Group $group) { $group = $group->with('members); return$ group } I want to return group with members paginated.
    Theodory Faustine
    • 432
    • 2
    • 10
    • 22
    1 2 3
    13
    14