Aronaman
1 month ago
192
4
Laravel

inside where

Posted 1 month ago by Aronaman

organization and individualRooms hasManyThrough Relationship. App/Organization::with('individualRooms')->get(); working fine.

      $orgAvailable = Organization::with('individualRooms')->where(function ($query) use ($individualRoomReserveId) {
    $query->whereNotIn('individualRooms.id', $individualRoomReserveId);
})->first();

my question is how can i use individualRooms column?? it shows me some error "individualRoom.id is not found in organization column."

any help, thanks

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