DashboardController::index()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 0
cts 7
cp 0
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php namespace Arcanesoft\Auth\Http\Controllers\Admin;
2
3
use Arcanesoft\Auth\Policies\DashboardPolicy;
4
5
/**
6
 * Class     DashboardController
7
 *
8
 * @package  Arcanesoft\Auth\Http\Controllers\Foundation
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class DashboardController extends Controller
12
{
13
    /* -----------------------------------------------------------------
14
     |  Constructor
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Instantiate the controller.
20
     */
21
    public function __construct()
22
    {
23
        parent::__construct();
24
25
        $this->setCurrentPage('auth-dashboard');
26
    }
27
28
    /* -----------------------------------------------------------------
29
     |  Main Methods
30
     | -----------------------------------------------------------------
31
     */
32
33
    public function index()
34
    {
35
        $this->authorize(DashboardPolicy::PERMISSION_STATS);
36
37
        $this->setTitle($title = trans('auth::dashboard.titles.statistics'));
38
        $this->addBreadcrumb($title);
39
40
        return $this->view('admin.dashboard');
41
    }
42
}
43