CollectionsController::show()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Colligator\Http\Controllers;
4
5
use Colligator\Collection;
6
use Colligator\Http\Requests\CreateCollectionRequest;
7
8
class CollectionsController extends Controller
9
{
10
    /**
11
     * Display a listing of the resource.
12
     *
13
     * @return Response
14
     */
15
    public function index()
16
    {
17
        return response()->json([
18
            'collections' => Collection::all(),
19
        ]);
20
    }
21
22
    /**
23
     * Display the specified resource.
24
     *
25
     * @param int $id
26
     *
27
     * @return Response
28
     */
29
    public function show($id)
30
    {
31
        $collection = Collection::findOrFail($id);
32
33
        return response()->json([
34
            'collection' => $collection,
35
        ]);
36
    }
37
38
    /**
39
     * Show the form for creating a new resource.
40
     *
41
     * @return Response
42
     */
43
    public function create()
44
    {
45
        // return view('collections.create');
46
    }
47
48
    /**
49
     * Store a newly created resource in storage.
50
     *
51
     * @return Response
52
     */
53
    public function store(CreateCollectionRequest $request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
54
    {
55
        // dd($request->name);
56
    }
57
58
    /**
59
     * Show the form for editing the specified resource.
60
     *
61
     * @param int $id
62
     *
63
     * @return Response
64
     */
65
    public function edit($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
66
    {
67
        //
68
    }
69
70
    /**
71
     * Update the specified resource in storage.
72
     *
73
     * @param int $id
74
     *
75
     * @return Response
76
     */
77
    public function update($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
78
    {
79
        //
80
    }
81
82
    /**
83
     * Remove the specified resource from storage.
84
     *
85
     * @param int $id
86
     *
87
     * @return Response
88
     */
89
    public function destroy($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
90
    {
91
        //
92
    }
93
}
94