Completed
Push — master ( f7b1d9...1d2285 )
by Sergi Tur
26:58
created

config/menu.php (3 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
use Spatie\Menu\Laravel\Menu;
4
use Spatie\Menu\Laravel\Html;
5
use Spatie\Menu\Laravel\Link;
6
7
//Menu::macro('fullsubmenuexample', function () {
0 ignored issues
show
Unused Code Comprehensibility introduced by
63% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
8
//    return Menu::new()->prepend('<a href="#"><span> Multilevel PROVA </span> <i class="fa fa-angle-left pull-right"></i></a>')
9
//        ->addParentClass('treeview')
10
//        ->add(Link::to('/link1prova', 'Link1 prova'))->addClass('treeview-menu')
11
//        ->add(Link::to('/link2prova', 'Link2 prova'))->addClass('treeview-menu')
12
//        ->url('http://www.google.com', 'Google');
13
//});
14
15
Menu::macro('adminlteSubmenu', function ($submenuName) {
16
    return Menu::new()->prepend('<a href="#"><span> ' . $submenuName . '</span> <i class="fa fa-angle-left pull-right"></i></a>')
17
        ->addParentClass('treeview')->addClass('treeview-menu');
18
});
19
Menu::macro('adminlteMenu', function () {
20
    return Menu::new()
21
        ->addClass('sidebar-menu');
22
});
23
Menu::macro('adminlteSeparator', function ($title) {
24
    return Html::raw($title)->addParentClass('header');
25
});
26
27
Menu::macro('adminlteDefaultMenu', function ($content) {
28
    return Html::raw('<i class="fa fa-link"></i><span>' . $content . '</span>')->html();
29
});
30
31
Menu::macro('sidebar', function () {
32
    return Menu::adminlteMenu()
33
        ->add(Html::raw('HEADER')->addParentClass('header'))
34
        ->action('HomeController@index', '<i class="fa fa-home"></i><span>Home</span>')
35
        ->link('http://www.acacha.org', Menu::adminlteDefaultMenu('Another link'))
36
//        ->url('http://www.google.com', 'Google')
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
37
        ->add(Menu::adminlteSeparator('Acacha Adminlte'))
38
        #adminlte_menu
39
        ->add(Menu::adminlteSeparator('SECONDARY MENU'))
40
        ->add(Menu::new()->prepend('<a href="#"><i class="fa fa-share"></i><span>Multilevel</span> <i class="fa fa-angle-left pull-right"></i></a>')
41
            ->addParentClass('treeview')
42
            ->add(Link::to('/link1', 'Link1'))->addClass('treeview-menu')
43
            ->add(Link::to('/link2', 'Link2'))
44
            ->url('http://www.google.com', 'Google')
45
            ->add(Menu::new()->prepend('<a href="#"><span>Multilevel 2</span> <i class="fa fa-angle-left pull-right"></i></a>')
46
                ->addParentClass('treeview')
47
                ->add(Link::to('/link21', 'Link21'))->addClass('treeview-menu')
48
                ->add(Link::to('/link22', 'Link22'))
49
                ->url('http://www.google.com', 'Google')
50
            )
51
        )
52
//        ->add(
0 ignored issues
show
Unused Code Comprehensibility introduced by
53% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
53
//            Menu::fullsubmenuexample()
54
//        )
55
//        ->add(
56
//            Menu::adminlteSubmenu('Best menu')
57
//                ->add(Link::to('/acacha', 'acacha'))
58
//                ->add(Link::to('/profile', 'Profile'))
59
//                ->url('http://www.google.com', 'Google')
60
//        )
61
        ->setActiveFromRequest();
62
});
63