I have gone into this strange issue, I exported the database from the staging server to local and just import it, and boom it is showing data, but in the case of the staging server it is returning an empty result for the following query.
$categories = \DB::table('floor_plans as fp')
->join('unit_type_details as utd','fp.unit_type_detail_id','utd.id')
->join('amenity_pricing_reviews as apr', strtolower('fp.pms_unit_type'), strtolower('apr.pms_unit_type'))
->select('fp.id','fp.unit_type_detail_id', 'fp.pms_unit_type', 'fp.unit_count', 'fp.pricing_offset', 'apr.dom','utd.unit_type')
->where('fp.property_id',$property->id)
->whereNull('fp.deleted_at')
->whereNull('utd.deleted_at')
->whereNull('apr.deleted_at')
->orderBy('fp.pms_unit_type','asc')
->get()
->groupBy(['unit_type_detail_id','pms_unit_type']);
What could be the issue? From where I could start debugging it? I could confirm,
- database is the same
-
$property->id which is the only dynamic field on the query is also the same..