Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function read($id) |
||
27 | { |
||
28 | // find object in active record model |
||
29 | $record = CommentPost::with(['answers'])->find($id); |
||
30 | if (!$record) { |
||
31 | throw new NotFoundException(__('Comment is not founded')); |
||
32 | } |
||
33 | |||
34 | // render response |
||
35 | return $this->view->render('comments/read', [ |
||
36 | 'record' => $record |
||
37 | ]); |
||
39 | } |