Call to undefined method Illuminate\Database\Query\Builder::links()

前端 未结 1 1781
时光取名叫无心
时光取名叫无心 2021-01-13 14:46

whats up ? I have a little problem with Laravel Paginator.

I built the function using order by and paginator, but I\'m getting the error message \"Call to undefined

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-13 15:17

    You are overriding the $premios variable in the foreach. Use it as singular form in the foreach:

    @foreach($premios as $premio)
        {{$premio->titulo}}
        {{$premio->data}}
    @endforeach
    
    {{ $premios->links() }}
    

    0 讨论(0)
提交回复
热议问题