Skip to content

Commit

Permalink
Merge pull request #6 from nickbyte/master
Browse files Browse the repository at this point in the history
Adding method for disapproving a comment
  • Loading branch information
mpociot authored Feb 28, 2019
2 parents 7bbc024 + e8b5b7a commit faeb83b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ public function approve()

return $this;
}

public function disapprove()
{
$this->update([
'is_approved' => false,
]);

return $this;
}

protected function getAuthModelName()
{
Expand All @@ -57,4 +66,4 @@ protected function getAuthModelName()
throw new Exception('Could not determine the commentator model name.');
}

}
}

0 comments on commit faeb83b

Please sign in to comment.