Completed
Push — master ( a964bf...08af9f )
by David
05:01 queued 18s
created

TemplateController::showWithDetail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 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  int $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
}