Fenos\Notifynder\Notifications\NotificationRepository::getStack PHP Method

getStack() public method

You can also limit the number of Notifications if you don't, it will get all.
public getStack ( $stackId, null $limit = null, integer | null $paginate = null, string $orderDate = 'desc', Closur\Closure $filterScope = null ) : mixed
$stackId
$limit null
$paginate integer | null
$orderDate string
$filterScope Closur\Closure
return mixed
    public function getStack($stackId, $limit = null, $paginate = null, $orderDate = 'desc', Closure $filterScope = null)
    {
        $query = $this->notification->with('body', 'from', 'to')->byStack($stackId)->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();
    }