I got result from database in laravel DB::select.
Now i want to find count of different records in the array.
To find rentals , I have type = 1 so i tried this
$rentals = array_only($arr, ['type', 1]);
This give me wrong result.
To find commercial in rentals i am using this code
$rentals = array_only($arr, ['type', 1]['commercial',1]);
This also not working. How i can do it?