Adding method for disapproving a comment

This commit is contained in:
Nicholas Francis
2019-02-13 15:50:16 +05:30
committed by GitHub
parent 7bbc024302
commit e8b5b7a237
+9
View File
@@ -44,6 +44,15 @@ class Comment extends Model
return $this; return $this;
} }
public function disapprove()
{
$this->update([
'is_approved' => false,
]);
return $this;
}
protected function getAuthModelName() protected function getAuthModelName()
{ {
if (config('comments.user_model')) { if (config('comments.user_model')) {