ContentController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A show() 0 10 1
1
<?php
2
3
namespace App\Http\Controllers\Front;
4
5
use App\Model\Admin\Entity;
6
use App\Repository\Admin\ContentRepository;
7
8
class ContentController extends BaseController
9
{
10
    public function show($entityId, $contentId)
11
    {
12
        $entity = Entity::query()->External()->findOrFail($entityId);
13
14
        ContentRepository::setTable($entity->table_name);
15
        $content = ContentRepository::findOrFail($contentId);
16
17
        return view(
18
            'front.content.show',
19
            array_merge(['content' => $content, 'entityId' => $entityId], ContentRepository::adjacent($contentId))
20
        );
21
    }
22
}
23