Fenos\Notifynder\NotifynderManager::getLastNotification PHP Method

getLastNotification() public method

Get last notification of the given entity, second parameter can filter by category.
public getLastNotification ( $toId, null $category = null, Closur\Closure $filterScope = null ) : mixed
$toId
$category null
$filterScope Closur\Closure
return mixed
    public function getLastNotification($toId, $category = null, Closure $filterScope = null)
    {
        $notification = $this->notification->entity($this->entity);
        if (is_null($category)) {
            return $notification->getLastNotification($toId, $filterScope);
        }
        return $notification->getLastNotificationByCategory($category, $toId, $filterScope);
    }