Skip to content

Commit faeb83b

Browse files
authored
Merge pull request #6 from nickbyte/master
Adding method for disapproving a comment
2 parents 7bbc024 + e8b5b7a commit faeb83b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Comment.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ public function approve()
4343

4444
return $this;
4545
}
46+
47+
public function disapprove()
48+
{
49+
$this->update([
50+
'is_approved' => false,
51+
]);
52+
53+
return $this;
54+
}
4655

4756
protected function getAuthModelName()
4857
{
@@ -57,4 +66,4 @@ protected function getAuthModelName()
5766
throw new Exception('Could not determine the commentator model name.');
5867
}
5968

60-
}
69+
}

0 commit comments

Comments
 (0)