Code Duplication    Length = 46-46 lines in 2 locations

app/Http/Controllers/Admin/SettingsController.php 1 location

@@ 37-82 (lines=46) @@
34
     *
35
     * @return void
36
     */
37
    public function __construct()
38
    {
39
        $this->subMenu = [
40
            'overview' => [
41
                'title'  => 'Overview',
42
                'url'    => route('admin.index'),
43
                'icon'   => 'fa fa-wrench',
44
                'active' => false,
45
            ],
46
            'general' => [
47
                'title'  => trans('admin.settings.general.general'),
48
                'url'    => route('admin.settings.general'),
49
                'icon'   => 'fa fa-gear',
50
                'active' => false,
51
            ],
52
            'theme' => [
53
                'title'  => trans('admin.settings.theme.theme'),
54
                'url'    => route('admin.settings.theme'),
55
                'icon'   => 'fa fa-list-alt',
56
                'active' => false,
57
            ],
58
            'stylesheet' => [
59
                'title'  => trans('admin.settings.stylesheet.stylesheet'),
60
                'url'    => route('admin.settings.stylesheet'),
61
                'icon'   => 'fa fa-magic',
62
                'active' => false,
63
            ],
64
            'localization' => [
65
                'title'  => trans('admin.settings.localization.localization'),
66
                'url'    => route('admin.settings.localization'),
67
                'icon'   => 'fa fa-language',
68
                'active' => false,
69
            ],
70
            'timezone' => [
71
                'title'  => trans('admin.settings.timezone.timezone'),
72
                'url'    => route('admin.settings.timezone'),
73
                'icon'   => 'fa fa-calendar',
74
                'active' => false,
75
            ],
76
        ];
77
78
        View::share([
79
            'sub_title' => trans('admin.settings.settings'),
80
            'sub_menu'  => $this->subMenu,
81
        ]);
82
    }
83
84
    /**
85
     * Shows the settings general view.

app/Http/Controllers/Admin/DashboardController.php 1 location

@@ 26-71 (lines=46) @@
23
     *
24
     * @return void
25
     */
26
    public function __construct()
27
    {
28
        $this->subMenu = [
29
            'overview' => [
30
                'title'  => 'Overview',
31
                'url'    => route('admin.index'),
32
                'icon'   => 'fa fa-wrench',
33
                'active' => false,
34
            ],
35
            'general' => [
36
                'title'  => trans('admin.settings.general.general'),
37
                'url'    => route('admin.settings.general'),
38
                'icon'   => 'fa fa-gear',
39
                'active' => false,
40
            ],
41
            'theme' => [
42
                'title'  => trans('admin.settings.theme.theme'),
43
                'url'    => route('admin.settings.theme'),
44
                'icon'   => 'fa fa-list-alt',
45
                'active' => false,
46
            ],
47
            'stylesheet' => [
48
                'title'  => trans('admin.settings.stylesheet.stylesheet'),
49
                'url'    => route('admin.settings.stylesheet'),
50
                'icon'   => 'fa fa-magic',
51
                'active' => false,
52
            ],
53
            'localization' => [
54
                'title'  => trans('admin.settings.localization.localization'),
55
                'url'    => route('admin.settings.localization'),
56
                'icon'   => 'fa fa-language',
57
                'active' => false,
58
            ],
59
            'timezone' => [
60
                'title'  => trans('admin.settings.timezone.timezone'),
61
                'url'    => route('admin.settings.timezone'),
62
                'icon'   => 'fa fa-calendar',
63
                'active' => false,
64
            ],
65
        ];
66
67
        View::share([
68
            'sub_title' => trans('admin.admin'),
69
            'sub_menu'  => $this->subMenu,
70
        ]);
71
    }
72
73
    /**
74
     * Display a listing of the resource.