Merge pull request #6 from nickbyte/master

Adding method for disapproving a comment
This commit is contained in:
Marcel Pociot
2019-02-28 14:27:11 +01:00
committed by GitHub
+10 -1
View File
@@ -43,6 +43,15 @@ class Comment extends Model
return $this;
}
public function disapprove()
{
$this->update([
'is_approved' => false,
]);
return $this;
}
protected function getAuthModelName()
{
@@ -57,4 +66,4 @@ class Comment extends Model
throw new Exception('Could not determine the commentator model name.');
}
}
}