public function getNotRead($toId, $entity, $limit = null, $paginate = null, $orderDate = 'desc', Closure $filterScope = null)
{
$query = $this->notification->with('body', 'from')->wherePolymorphic($toId, $entity)->withNotRead()->orderBy('read', 'ASC')->orderBy('created_at', $orderDate);
if ($limit && !$paginate) {
$query->limit($limit);
}
$query = $this->applyFilter($filterScope, $query);
if (is_int(intval($paginate)) && $paginate) {
return $query->paginate($limit);
}
return $query->get();
}