내 laravel4 응용 프로그램을 laravel 5로 포팅하려고합니다. 이전 버전에서는 다음과 같은 방법으로 페이지 매김 URL을 생성 할 수있었습니다. 제어기에서laravel 5에서 페이지 매김을 사용하는 방법은 무엇입니까?
:
$this->data['pages']= Page::whereIn('area_id', $suburbs)->where('score','>','0')->orderBy('score','desc')->paginate(12);
및 뷰와 데이터 배열을 공유 후,이
보기에서사용자 수 :
{{$pages->links()}}
laravel 5는 고 다음과 같은 오류가 발생합니다.
ErrorException in AbstractPaginator.php line 445:
call_user_func_array() expects parameter 1 to be a valid callback, class 'Illuminate\Support\Collection' does not have a method 'links'
여기에 누락 된 내용이 확실하지 않은 경우 누군가 도움이 될 수 있습니까?
버그가 있고 기본 코드가 변경 될 수 있기 때문에 Laravel 5가 안정 될 때까지 기다리는 것이 좋습니다. –
@ClaudioLudovicoPanetta 이번 달에 출시 될 것이라고 생각합니다. :) 변경 사항과 동기화되기를 원했습니다. 생산을 위해 4.2를 사용합니다. –
귀하의 문제가 귀하의 문제보다 더 많은 Laravel 문제로 보입니다. 해결책에 대한 문제를 귀하에게 재현하려고합니다. –