手动分页错误 - Laravel 5.0
Manual Pagination Error - Laravel 5.0
传递数组 count(array)
和 itemsPerPage
作为参数时出现以下错误。
Call to undefined method Illuminate\Pagination\Paginator::make()
我尝试跟随它但无法修复错误。
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Pagination;
use Illuminate\Support\Facades\Paginator;
use Illuminate\Pagination\Factory;
use App\Response;
make
方法在 http://laravel.com/api/5.0/Illuminate/Pagination/Environment.html#method_make 文档中定义。
也许尝试删除这些行:
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Support\Facades\Paginator;
然后添加:
use Illuminate\Pagination\Paginator;
然后使用$paginator->render()
代替make()
删除这两个:
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Pagination;
就这些了。
传递数组 count(array)
和 itemsPerPage
作为参数时出现以下错误。
Call to undefined method Illuminate\Pagination\Paginator::make()
我尝试跟随它但无法修复错误。
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Pagination;
use Illuminate\Support\Facades\Paginator;
use Illuminate\Pagination\Factory;
use App\Response;
make
方法在 http://laravel.com/api/5.0/Illuminate/Pagination/Environment.html#method_make 文档中定义。
也许尝试删除这些行:
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Support\Facades\Paginator;
然后添加:
use Illuminate\Pagination\Paginator;
然后使用$paginator->render()
代替make()
删除这两个:
use Illuminate\Pagination\LengthAwarePaginator as Paginator;
use Illuminate\Pagination;
就这些了。