I have a Query
in my Criteria
that returns the id
belonging to relationship between models
if ($this->request->has('notin_portal'))
{
$portal = $this->request->get('notin_portal');
if ($this->request->get('notin_portal'))
{
$model = $model->whereHas('portals', function($query) use ($portal)
{
$query->where('id', $portal);
});
return $model;
}
}
My problem is that I need to return the ids
that DO NOT belong to the portals
relationship in models. Is there something like ?