DashboardController::index()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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