/** * Build your sidebar implementation here. */ public function build() { foreach ($this->modules->enabled() as $module) { $name = studly_case($module->getName()); $class = 'Modules\\' . $name . '\\MenuExtenders\\SidebarExtender'; if (class_exists($class)) { $extender = $this->container->make($class); $this->menu->add($extender->extendWith($this->menu)); } } }
/** * Build your sidebar implementation here */ public function build() { $sidebars = array_merge($this->config->get('administr.modules'), $this->config->get('administr.sidebars')); foreach ($sidebars as $module) { $class = studly_case($module); if (!class_exists($class)) { $class = "Administr\\{$class}\\SidebarExtender"; } if (!class_exists($class)) { continue; } $extender = $this->app->make($class); $this->menu->add($extender->extendWith($this->menu)); } }