I have 2 models in my app:
1. Customer.php
2. Car.php
Now I would like to run a query that returns all customers that h
Use this:
$customers = Customer::withCount('cars') ->having('cars_count', '<', 2) ->get();