laravel 5.0中的多重分页

时间:2017-02-13 15:43:44

标签: laravel-5 pagination

我有一个laravel 5.0项目,我现在正在处理这个分页但是为什么它没有更改到下一页?有人知道或遇到这个问题吗?

我的控制器

公共职能($ ship_id){

    $members = Member::where('ship_id','=',$ship_id)->latest()->paginate(3);
    $members->setPageName('members_page');
    $pendings = AddRequest::where('ship_id','=',$ship_id)->paginate(3); 
    $pendings->setPageName('pendings_page');

return view('pages.Organization.List-Of-Organization-Scholar',compact('ship','schol','pendings','members','count_member','recommends'));
}

我的观点

 @foreach($members as $member)
    <div class="col-lg-4">
        <div class="col-lg-12 well">
            <a class="thumbnail" href="#">
                <img class="img-responsive" src="../../{!! $member->Memscholar->scholar_image !!}" alt="" height="150" width="200">
            </a>
            <p>
                <h3>{!! $member->Memscholar->scholar_lname !!}, {!! $member->Memscholar->scholar_fname !!}</h3>

            </p>
        </div>
    </div>
    @endforeach
    <div class = "col-md-12">
{!! $members->appends(array_except(Request::query(), 'members_page'))->render()!!}
    </div>

  @foreach($pendings as $pending)
    <div class="col-lg-4">
        <div class="col-lg-12 well">
            <a class="thumbnail" href="#">
                <img class="img-responsive" src="../../{!! $pending->Pendscholar->scholar_image !!}" alt="" height="150" width="200">
            </a>
        </div>
    </div>
    @endforeach
   <div class = "col-md-12"> 
{!! $pendings->appends(array_except(Request::query(), 'pendings_page'))->render()!!}
    </div>

0 个答案:

没有答案