问题
I am getting the following error while passing an array, count(array)
and itemsPerPage
as arguments.
Call to undefined method Illuminate\Pagination\Paginator::make()
I tried following with it but cant fix the error.
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Pagination;
use Illuminate\Support\Facades\Paginator;
use Illuminate\Pagination\Factory;
use App\Response;
make
method is defined in http://laravel.com/api/5.0/Illuminate/Pagination/Environment.html#method_make document.
回答1:
Maybe try to remove these lines:
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Support\Facades\Paginator;
Then add this:
use Illuminate\Pagination\Paginator;
Then use $paginator->render()
instead of make()
回答2:
Remove those two:
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Pagination;
That's all.
来源:https://stackoverflow.com/questions/28919497/manual-pagination-error-laravel-5-0