dwijitsolutions / laraadmin

LaraAdmin is a Open source Laravel Admin Panel / CMS which can be used as Admin Backend, Data Management Tool or CRM boilerplate for Laravel with features like Advanced CRUD Generation, Module Manager, Backups and many more.
http://laraadmin.com
MIT License
1.56k stars 538 forks source link

ErrorException in Builder.php line 1185: #297

Open shammas123 opened 6 years ago

shammas123 commented 6 years ago

count(): Parameter must be an array or an object that implements Countable

leopinzon commented 6 years ago

@shammas123 Hi there. Check your PHP version, this error usually happens in PHP 7.2, that's why it isn't supported (yet). Try using PHP 7.1

jarielfloriano commented 5 years ago

This error is caused by the PHP version.

Modify line 1185 of the Builder.php file

$originalWhereCount = count ($ query-> wheres);

to

$originalWhereCount = 0;
        if (is_array ($ query-> wheres) || is_object ($ query-> wheres)) {
$originalWhereCount = count ($ query-> wheres);
}