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

前端 未结 1 1782
时光取名叫无心
时光取名叫无心 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)
        <span class="tituloPremio">{{$premio->titulo}}</span>
        <span class="dataPremio">{{$premio->data}}</span>
    @endforeach
    
    {{ $premios->links() }}
    
    0 讨论(0)
提交回复
热议问题