I have joined three tables in my database, now I want to select the values in the column zone distinctively in zones table and take the count of each zone which repeats in the joined table. The below code is how I joined the cities,store and zone tables,
$zones= Store::join('cities as c','store.city_id','=','c.id')
->join('zones as z','c.zone_id','=','z.id')
->get();