Completed
Push — master ( 720025...0e57e6 )
by ARCANEDEV
04:07
created

DashboardController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 31
c 0
b 0
f 0
ccs 0
cts 13
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A index() 0 10 1
1
<?php namespace Arcanesoft\Auth\Http\Controllers\Admin;
2
3
use Arcanesoft\Auth\Http\Controllers\Admin\Controller;
4
use Arcanesoft\Auth\Policies\DashboardPolicy;
5
6
/**
7
 * Class     DashboardController
8
 *
9
 * @package  Arcanesoft\Auth\Http\Controllers\Foundation
10
 * @author   ARCANEDEV <[email protected]>
11
 *
12
 * @todo: Adding the authorization checks
13
 */
14
class DashboardController extends Controller
15
{
16
    /* ------------------------------------------------------------------------------------------------
17
     |  Constructor
18
     | ------------------------------------------------------------------------------------------------
19
     */
20
    /**
21
     * Instantiate the controller.
22
     */
23
    public function __construct()
24
    {
25
        parent::__construct();
26
27
        $this->setCurrentPage('auth-dashboard');
28
    }
29
30
    /* ------------------------------------------------------------------------------------------------
31
     |  Main Functions
32
     | ------------------------------------------------------------------------------------------------
33
     */
34
    public function index()
35
    {
36
        $this->authorize(DashboardPolicy::PERMISSION_STATS);
37
38
        $title = 'Authorization - Dashboard';
39
        $this->setTitle($title);
40
        $this->addBreadcrumb('Statistics');
41
42
        return $this->view('admin.dashboard');
43
    }
44
}
45