| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class CommentController extends Controller |
||
| 10 | { |
||
| 11 | public function __construct() |
||
| 12 | { |
||
| 13 | parent::__construct(); |
||
| 14 | $this->middleware('permission:comments.edit', ['only' => 'delete']); |
||
| 15 | } |
||
| 16 | |||
| 17 | public function store(StoreRequest $request) |
||
| 27 | ]); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function update(Comment $comment, StoreRequest $request) |
||
| 31 | { |
||
| 32 | $comment->update([ |
||
| 33 | 'body' => $request->input('body'), |
||
| 34 | ]); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function destroy(Comment $comment) |
||
| 40 | } |
||
| 41 | } |
||
| 42 |