Laravel + Jenssegers\\Mongodb: 'WhereHas' and 'Has' returns empty collection
I'm mainly working on two models right now, Form and Notification , and a many-to-many relationship is set up and working for most Eloquent commands, except for whereHas and has . Both just return an empty array, [] . It seems like the developer has had trouble with getting this to work in the past , but seems to have solved it here . Here's a sample of what I have so far, and what I've tried: Form.php class Form extends Eloquent { protected $connection = 'mongodb'; public function notifications(){ return $this->belongsToMany('App\Api\Forms\Notification', null, 'form_ids', 'notification_ids');