从 3.1.54 更新到 3.2.3 后调用 "laravel backpack crud" 中数组的成员函数 count()

Call to a member function count() on array in "laravel backpack crud" after update from 3.1.54 to 3.2.3

我用 laravel backpack packages.Last 晚上 运行 composer update 构建了我的管理面板,它将我的 backpack-crud 包从 3.1.54 更新到 3.2。 3,在更新之前一切正常,但现在我在管理列表中收到 "Call to a member function count() on array" 错误。

当我检查框架文件时,在以下代码中创建的问题:

<?php if($crud->filters->count()): ?>
  <?php echo $__env->make('crud::inc.filters_navbar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php endif; ?>

任何解决此问题的帮助

如果您仍在使用旧的视图文件,这是一个错误。请参阅升级指南中的步骤 #4:https://laravel-backpack.readme.io/v3.0/docs/upgrade-from-31-to-32#section-how-to-upgrade

A lot of important CRUD blade files have suffered changes (create, edit, form_content, list, show, revisions, revisions_timeline). If you've overwritten these by placing files with the same names in your /resources/views/vendor/backpack/crud folder, unfortunately, the fastest way to upgrade would be to delete your custom files, use the new files and redo your modifications. This shouldn't be a big issue for most admin panels, since they're not published by default and 99% of Backpack users don't overwrite them, but if you did, this is going to be the most laborious step of the process. If you want to take a look at the changes, you can do that in this diff.