Code Duplication    Length = 22-22 lines in 2 locations

app/Http/Controllers/Dashboard/GroupsController.php 1 location

@@ 33-54 (lines=22) @@
30
     *
31
     * @return void
32
     */
33
    public function __construct()
34
    {
35
        $this->subMenu = [
36
            'yours'   => [
37
                'title'  => trans_choice('gitamin.groups.yours', 2),
38
                'url'    => route('dashboard.groups.index'),
39
                'icon'   => 'fa fa-folder',
40
                'active' => false,
41
            ],
42
            'explore' => [
43
                'title'  => trans('gitamin.groups.explore'),
44
                'url'    => route('explore.groups'),
45
                'icon'   => 'fa fa-eye',
46
                'active' => false,
47
            ],
48
        ];
49
50
        View::share([
51
            'sub_menu'  => $this->subMenu,
52
            'sub_title' => trans_choice('dashboard.groups.groups', 2),
53
        ]);
54
    }
55
56
    /**
57
     * Shows the project group view.

app/Http/Controllers/Dashboard/MomentController.php 1 location

@@ 38-59 (lines=22) @@
35
     *
36
     * @return void
37
     */
38
    public function __construct()
39
    {
40
        $this->subMenu = [
41
            'moments' => [
42
                'title'  => trans('dashboard.projects.yours'),
43
                'url'    => route('dashboard.moments.index'),
44
                'icon'   => 'fa fa-sliders',
45
                'active' => false,
46
            ],
47
            'project_update' => [
48
                'title'  => trans('dashboard.projects.starred'),
49
                'url'    => route('dashboard.moments.index'),
50
                'icon'   => 'fa fa-edit',
51
                'active' => false,
52
            ],
53
        ];
54
55
        View::share([
56
            'sub_menu'  => $this->subMenu,
57
            'sub_title' => trans_choice('dashboard.moments.moments', 2),
58
        ]);
59
    }
60
61
    public function index()
62
    {