Member::whereHas('membership', function ($q) { $q->where('expiration', 'like', 'somethingToSearchFor'); })->get();