TemplateController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 1
c 2
b 1
f 0
lcom 1
cbo 2
dl 0
loc 39
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A showWithDetail() 0 8 1
1
<?php 
2
3
namespace App\Http\Controllers\Api\V1;
4
5
use App\Http\Controllers\Api\V1\ApiController;
6
use App\LaravelRestCms\Template\Template as Template;
7
8
class TemplateController extends ApiController
9
{
10
	/**
11
	 * The name of the model to use for this package
12
	 * 
13
	 * @var string
14
	 */
15
	protected $modelName = \App\LaravelRestCms\Template\Template::class;
16
    
17
	/**
18
	 * The name of the transformer to use for this package
19
	 * 
20
	 * @var string
21
	 */
22
	protected $transformerName = \App\LaravelRestCms\Template\TemplateTransformer::class;
23
    
24
	/**
25
	 * The key to use as a key for this collection in the output
26
	 * 
27
	 * @var string
28
	 */
29
	protected $collectionName = 'templates';
30
31
	/**
32
	 * Returns a page and associated detail and template data
33
	 * 
34
	 * @param  mixed $id
35
	 * @return \Illuminate\Http\JsonResponse
36
	 */
37
	public function showWithDetail($id)
38
	{        
39
		$this->manager->parseIncludes([
40
			'detail',
41
		]);
42
43
		return $this->show($id);
44
	}
45
46
}