I have just update my 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
Had teh exact same problem, and still don't know how I fixed it. Try php artisan clear to clean compiled templates, or delete your vendor folder and composer update again, something along those lines fixed it for me
Hi guys,
No matter how much I tried, I wasn't able to get the same error updating. If you guys figure out what command helps to clear everything, please let me know - I'd love to put it in the upgrade guide for others. Ideas:
php artisan cache:clear
php artisan dump-autoload
php artisan clear-compiled
Thanks, cheers!
you may try to change from <?php if($crud->filters->count()): ?> to
<?php if(count($crud->filters)): ?>
i also got the error today and when i dd the $crud->filters i got a '[]' as output...
Yes this happened to me too. Ended migrate to Laravel 5.4 ... haha
the same thing.
@AurelDragut fix helped me.
Hello guys,
Check if you have the following file:
/resources/views/vendor/backpack/crud/list.blade.php
If you have it, you must migrate the changes manually.
Otherwise try running:
php artisan view:clear
after update.
Hey,
I got this issue and also issue related to getUri()...
then re-run:
php artisan vendor:publish --provider="Backpack\CRUD\CrudServiceProvider" --tag="views"
php artisan vendor:publish --provider="Backpack\Base\BaseServiceProvider" --tag="views"
hope it will help!
For me, I had a list.blade.php in resources\views\vendor\backpack\crud, despite not having changed this manually, so I removed this and re-ran:
php artisan vendor:publish --provider="Backpack\CRUD\CrudServiceProvider" --tag="views"
to recreate it, and all was well.
Most helpful comment
For me, I had a list.blade.php in resources\views\vendor\backpack\crud, despite not having changed this manually, so I removed this and re-ran:
php artisan vendor:publish --provider="Backpack\CRUD\CrudServiceProvider" --tag="views"
to recreate it, and all was well.