(初学者帖) 关于Laravel 自定义分页的 疑问

index 视图

<?php echo $articles->links('vendor.default'); ?>

vendor/default 视图

<?php
$presenter = new Illuminate\Pagination\BootstrapPresenter($paginator);
?>

共 {$paginator->getCurrentPage()}  条记录

<div class="am-fr">

<ul class="am-pagination">
    <?php echo $presenter->render(); ?>
</ul>

</div>

报错提示:

ErrorException in LengthAwarePaginator.php line 117:
Argument 1 passed to Illuminate\Pagination\LengthAwarePaginator::links() must be an instance of Illuminate\Contracts\Pagination\Presenter, string given, called in D:\phpStudy\WWW\laravel\storage\framework\views\3cea418da2ec238bb24a83daf337cb1ff4d5a21a.php on line 19 and defined (View: D:\phpStudy\WWW\laravel\resources\views\articles\index.blade.php)
  • 疑问一:如何处理上诉的报错

  • 疑问二:能否分享一下 常见的几种 自定义分页方式