webman-laravel-ORM 分页报错解析

zeus

如果调用了paginate方法,但是报错 : default.ERROR: Class 'Illuminate\Pagination\Paginator' not found

运行 composer require illuminate/pagination,这样就可以使用 illuminate/database 的分页了

但是要注意和数据库ORM版本一致, 所以安装的时候最好加上版本号 :
composer require illuminate/pagination "7.*".

-------------------------------分割线----------------------------------
还是继续报错: ErrorException: call_user_func() expects parameter 1 to be a valid callback, no array or string given in D:\web\webman\vendor\illuminate\pagination\AbstractPaginator.php:519
最后发现用了模板引擎必须采用 blade才能使用此分页组件。

1505 2 0
2个评论

493226876

php8 执行了 composer require illuminate/pagination 报这个错
BadMethodCallException: Method Illuminate\Support\Collection::paginate does not exist. in

  • 暂无评论
ersic

你发错地了啊,应该发问答,你发分享里了。

年代过于久远,无法发表评论

zeus

2380
积分
0
获赞数
0
粉丝数
2018-07-04 加入
🔝