protected function addNewModels(array $newModels)
 {
     foreach (array_unique($newModels) as $model) {
         $this->info("Adding new model {$model}...");
         $this->config->addModel(new $model());
         $this->navigation->addItem(['class_name' => $model, 'slug' => ElegantModel::normalizeClassName($model)]);
     }
 }
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('elegant::elegant.title.main'), function (Group $group) {
         foreach ($this->navigation->getNavigation() as $navItem) {
             $group->item(str_plural(class_basename($navItem['class_name'])), function (Item $item) use(&$navItem) {
                 $item->icon('fa fa-book');
                 $item->weight(45);
                 $item->route('admin.elegant.elegant.index', ['elegant_model' => $navItem['slug']]);
                 $item->authorize($this->auth->hasAccess("elegant.{$navItem['slug']}.index"));
                 unset($navItem);
             });
         }
         $group->item(trans('elegant::modelsettings.title.modelsettings'), function (Item $item) {
             $item->icon('fa fa-cog');
             $item->weight(50);
             $item->route('admin.elegant.modelsettings.index');
             $item->authorize($this->auth->hasAccess('elegant.modelsettings.index'));
         });
     });
     return $menu;
 }