Completed
Pull Request — master (#10)
by Manuel
02:47
created

GroupController::show()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace PiFinder\Http\Controllers;
4
5
use PiFinder\Device;
6
7
class GroupController extends Controller
8
{
9
    /**
10
     * Show all Devices for the given group.
11
     *
12
     * @param string $group
13
     *
14
     * @return Response
15
     */
16
    public function show($group)
17
    {
18
        $devices = Device::where('group', $group)->get();
19
20
        return view('overview')->with(compact('devices', 'group'));
21
    }
22
}
23