3

I have build my admin panel with laravel backpack packages.Last night I had run composer update which updated my backpack-crud package from 3.1.54 to 3.2.3, before update everything works perfectly but now i am getting "Call to a member function count() on array" error in admin listing.

when i check on the framework file the issue in create in below code:

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

any help how to resolve this

HKumar
  • 1,535
  • 3
  • 13
  • 28

1 Answers1

3

This is an error if you are still using the old view files. Please see step #4 in the upgrade guide: 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.

Jeff
  • 24,623
  • 4
  • 69
  • 78