4
I have a Query
in my Criteria
that returns the id
belonging to the relationship amid 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 relationship portals
in models. Is there anything like?