Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 1 year ago.
0

Laravel 4.0 or 4.1? whereHas is available only in 4.1.

Last updated 1 year ago.
0

Hi Gabriel, 4.1.

This works...

$activity = Activity::where('patient_id', '=', $patient->id)
    ->whereHas('calendar', function($q) {
          $q->where('private', '=', 1);
    })
    ->get();

...but the original code I posted does not.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

builtbyjay builtbyjay Joined 10 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.