laravel error @if(count($section['categories']>0)) code example
Example: count() parameter must be an array or an object that implements countable laravel
//add a typecast array to the array being called
$count = count((array)$originalArray);
//add a typecast array to the array being called
$count = count((array)$originalArray);