mirror of
https://github.com/wearepixel/laravel-comments.git
synced 2026-11-14 14:02:04 +00:00
Merge pull request #6 from nickbyte/master
Adding method for disapproving a comment
This commit is contained in:
+10
-1
@@ -43,6 +43,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()
|
||||||
{
|
{
|
||||||
@@ -57,4 +66,4 @@ class Comment extends Model
|
|||||||
throw new Exception('Could not determine the commentator model name.');
|
throw new Exception('Could not determine the commentator model name.');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user