Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function index(Guide $guide) |
||
12 | { |
||
13 | $this->breadcrumb->push($guide->title, UrlBuilder::guide($guide)); |
||
14 | |||
15 | $guide->loadCount('comments'); |
||
16 | $guide->load(['commentsWithChildren', 'subscribers', 'assets']); |
||
17 | $guide->loadUserVoterRelation($this->userId); |
||
18 | $guide->loadUserRoleRelation($this->userId); |
||
19 | |||
20 | GuideResource::withoutWrapping(); |
||
21 | |||
22 | return $this->view('guide.show', [ |
||
23 | 'guide' => (new GuideResource($guide))->toResponse($this->request)->getData(true) |
||
24 | ]); |
||
27 |