Level 15
Do you not have a direct relation to the AreaAss model and the LeasePropery?
$areaass = AreaAss::where('areaid', $AreaIds)
->with('properties')
->select('associd')
->get();
I'm getting myself in a corner If anyone could assist please, I need to get an array of Area id's then use that array to show all the related properties of those areas.
Below is what i have so far.
$areaass = AreaAss::where('areaid', $AreaIds)
->select('associd')
->get();
$property = LeaseProperty::whereIn('areaid', [$areaass])
// $property = LeaseProperty::whereIn('areaid', [63, 23, 30, 36, 37, 50, 61, 62, 320, 344])
->whereHas('unit', function ($query) {
$query->where('tolet', '1')
->select('type', 'unitsize', 'rentprice', 'tolet', 'forsale');
})
->paginate(10);
Please or to participate in this conversation.