Passed
Push — dev5a ( 2c238c...96dd50 )
by Ron
07:38
created

TechTipsController   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Test Coverage

Coverage 31.58%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 73
ccs 6
cts 19
cp 0.3158
rs 10
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A edit() 0 2 1
A destroy() 0 2 1
A show() 0 4 1
A search() 0 3 1
A create() 0 4 1
A store() 0 2 1
A update() 0 2 1
A index() 0 5 1
1
<?php
2
3
namespace App\Http\Controllers\TechTips;
4
5
use Illuminate\Http\Request;
6
7
use App\Http\Controllers\Controller;
8
9
use App\Http\Requests\TechTips\SearchTipsRequest;
10
11
use App\Domains\TechTips\SearchTips;
12
use App\Domains\Equipment\GetEquipment;
13
use App\Domains\TechTips\GetTechTipTypes;
14
15
class TechTipsController extends Controller
16
{
17
    //  Landing page - tech tip search form
18 2
    public function index()
19
    {
20 2
        return view('tips.index', [
21 2
            'tipTypes'  => (new GetTechTipTypes)->execute(),
22 2
            'equipment' => (new GetEquipment)->getAllEquipment(true),
23
        ]);
24
    }
25
26
    //  Submit a search request
27 2
    public function search(SearchTipsRequest $request)
28
    {
29 2
        return (new SearchTips)->execute($request);
30
    }
31
32
    //  New tech tip form
33
    public function create()
34
    {
35
        //
36
        echo 'new tip form';
37
    }
38
39
    /**
40
     * Store a newly created resource in storage.
41
     *
42
     * @param  \Illuminate\Http\Request  $request
43
     * @return \Illuminate\Http\Response
44
     */
45
    public function store(Request $request)
46
    {
47
        //
48
    }
49
50
    //  Show the Tech Tip Details
51
    public function show($id)
52
    {
53
        //
54
        echo 'tip details';
55
    }
56
57
    /**
58
     * Show the form for editing the specified resource.
59
     *
60
     * @param  int  $id
61
     * @return \Illuminate\Http\Response
62
     */
63
    public function edit($id)
64
    {
65
        //
66
    }
67
68
    /**
69
     * Update the specified resource in storage.
70
     *
71
     * @param  \Illuminate\Http\Request  $request
72
     * @param  int  $id
73
     * @return \Illuminate\Http\Response
74
     */
75
    public function update(Request $request, $id)
76
    {
77
        //
78
    }
79
80
    /**
81
     * Remove the specified resource from storage.
82
     *
83
     * @param  int  $id
84
     * @return \Illuminate\Http\Response
85
     */
86
    public function destroy($id)
87
    {
88
        //
89
    }
90
}
91