Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function __invoke(Request $request) |
||
20 | { |
||
21 | $comment = TechTipComment::findOrFail($request->id); |
||
22 | |||
23 | $comment->flagged = true; |
||
24 | $comment->save(); |
||
25 | |||
26 | event(new FlaggedTipCommentEvent($comment, $request->user())); |
||
27 | |||
28 | Log::alert('Comment "'.$comment->comment.'" has been flagged as inappropriate by '.$request->user()->full_name.' on Tech Tip ID '.$comment->tip_id); |
||
29 | return back()->with(['message' => 'Comment has been flagged as inappropriate and will be reviewed by a System Administrator', 'type' => 'danger']); |
||
30 | } |
||
32 |