RequestController::show()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Tracking\Http\Controllers\Metrics;
4
5
use Illuminate\Http\Request;
6
use Illuminate\Routing\Controller;
7
use Tracking\Models\Metrics\LarametricsRequest;
8
9
class RequestController extends Controller
10
{
11
    
12
    public function index()
13
    {
14
        $requests = LarametricsRequest::orderBy('created_at', 'desc')
15
            ->get();
16
            
17
        return view(
18
            'rica.larametrics::requests.index', [
19
            'requests' => $requests,
20
            'pageTitle' => 'Laravel Requests'
21
            ]
22
        );
23
    }
24
25
    public function show(LarametricsRequest $request)
26
    {
27
        return view(
28
            'rica.larametrics::requests.show', [
29
            'request' => $request,
30
            'pageTitle' => 'Viewing Request #' . $request->id
31
            ]
32
        );
33
    }
34
35
}
36