SettingsController::index()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 9
rs 9.6666
c 1
b 0
f 0
ccs 0
cts 7
cp 0
cc 1
eloc 5
nc 1
nop 0
crap 2
1
<?php namespace Arcanesoft\Seo\Http\Controllers\Admin;
2
3
use Arcanedev\LaravelSeo\Seo;
4
5
/**
6
 * Class     SettingsController
7
 *
8
 * @package  Arcanesoft\Seo\Http\Controllers\Admin
9
 * @author   ARCANEDEV <[email protected]>
10
 *
11
 * @todo: Add authorization checks
12
 */
13
class SettingsController extends Controller
14
{
15
    /* -----------------------------------------------------------------
16
     |  Constructor
17
     | -----------------------------------------------------------------
18
     */
19
20
    /**
21
     * SettingsController constructor.
22
     */
23
    public function __construct()
24
    {
25
        parent::__construct();
26
27
        $this->setCurrentPage('seo-settings');
28
        $this->addBreadcrumbRoute('Settings', 'admin::seo.settings.index');
29
    }
30
31
    public function index()
32
    {
33
        $this->setTitle($title = 'Settings');
34
        $this->addBreadcrumb($title);
35
36
        $redirector = Seo::getConfig('redirector');
37
38
        return $this->view('admin.settings', compact('redirector'));
39
    }
40
}
41