make('menu', function (Builder $menu) { $accueil = $menu->add('Accueil', ['route' => 'dashboard', 'class' => 'nav-item'])->nickname('home'); $accueil->link->attr(['class' => 'nav-link']); $accueil->prepend(' '); $accueil->checkActivationStatus(); $stats = $menu->add('Mes statistiques', ['route' => 'stats', 'class' => 'nav-item'])->nickname('stats'); $stats->link->attr(['class' => 'nav-link']); $stats->prepend(' '); $stats->checkActivationStatus(); $calendar = $menu->add('Mon calendrier', ['route' => ['calendar', 'month'], 'class' => 'nav-item'])->nickname('calendar'); $calendar->link->attr(['class' => 'nav-link']); $calendar->prepend(' '); $calendar->checkActivationStatus(); $gallery = $menu->add('Ma gallerie', ['route' => 'gallery', 'class' => 'nav-item'])->nickname('gallery'); $gallery->link->attr(['class' => 'nav-link']); $gallery->prepend(' '); $gallery->checkActivationStatus(); }); return $next($request); } }