sumitgroup
3 months ago
254
1
Laravel

How to remove already open project from Similar Project in Laravel?

Posted 3 months ago by sumitgroup

I have some property which is belongs to the open project locality, i am showing there related property which is available in that particular locality, everything is working fine but i don't want to show the property which is already open. I want top remove that property from related property....

Here are my code...

    $listview= Listing::where('slug',$slug)->first();
    $localityId=$listview->property->proLocality->lotId;
   $products2 = Listing::whereHas('property', function($q) use ($localityId, $listview){
    $q->where('lis_type',$listview->lis_type)->where('ls_fs','=',$listview->ls_fs)->where('subcategory',$listview->subcategory)->where('lotId',$localityId);
  })->get();

I dont what to show $listview property in products2 listings (Where products2 are showing related property)...

Please sign in or create an account to participate in this conversation.