Skip to content

Commit

Permalink
Merge pull request #202 from fenos/issue-200
Browse files Browse the repository at this point in the history
fix #200
  • Loading branch information
Gummibeer committed Aug 25, 2016
2 parents 86aece8 + c3a93de commit cabd0d6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Notifynder/Notifable.php
Expand Up @@ -39,7 +39,7 @@ public function readAllNotifications()
{
return $this->notifynderInstance()->entity(
$this->getMorphClass()
)->readAll($this->id);
)->readAll($this->getKey());
}

/**
Expand All @@ -53,7 +53,7 @@ public function readLimitNotifications($numbers = 10, $order = 'ASC')
{
return $this->notifynderInstance()->entity(
$this->getMorphClass()
)->readLimit($this->id, $numbers, $order);
)->readLimit($this->getKey(), $numbers, $order);
}

/**
Expand All @@ -67,7 +67,7 @@ public function deleteLimitNotifications($numbers = 10, $order = 'ASC')
{
return $this->notifynderInstance()->entity(
$this->getMorphClass()
)->deleteLimit($this->id, $numbers, $order);
)->deleteLimit($this->getKey(), $numbers, $order);
}

/**
Expand All @@ -79,7 +79,7 @@ public function deleteAllNotifications()
{
return $this->notifynderInstance()->entity(
$this->getMorphClass()
)->deleteAll($this->id);
)->deleteAll($this->getKey());
}

/**
Expand All @@ -95,7 +95,7 @@ public function getNotificationsNotRead($limit = null, $paginate = null, $order
{
return $this->notifynderInstance()->entity(
$this->getMorphClass()
)->getNotRead($this->id, $limit, $paginate, $order, $filterScope);
)->getNotRead($this->getKey(), $limit, $paginate, $order, $filterScope);
}

/**
Expand All @@ -111,7 +111,7 @@ public function getNotifications($limit = null, $paginate = null, $order = 'desc
{
return $this->notifynderInstance()->entity(
$this->getMorphClass()
)->getAll($this->id, $limit, $paginate, $order, $filterScope);
)->getAll($this->getKey(), $limit, $paginate, $order, $filterScope);
}

/**
Expand All @@ -125,7 +125,7 @@ public function getLastNotification($category = null, Closure $filterScope = nul
{
return $this->notifynderInstance()->entity(
$this->getMorphClass()
)->getLastNotification($this->id, $category, $filterScope);
)->getLastNotification($this->getKey(), $category, $filterScope);
}

/**
Expand All @@ -138,7 +138,7 @@ public function countNotificationsNotRead(Closure $filterScope = null)
{
return $this->notifynderInstance()->entity(
$this->getMorphClass()
)->countNotRead($this->id, $filterScope);
)->countNotRead($this->getKey(), $filterScope);
}

/**
Expand Down

0 comments on commit cabd0d6

Please sign in to comment.