check if the module exists
This commit is contained in:
parent
ab6ec4efb5
commit
c0a1d7b2ba
@ -169,12 +169,12 @@ class AdminMenu
|
||||
foreach ($modules as $module) {
|
||||
$m = LaravelModule::findByAlias($module->alias);
|
||||
|
||||
// Check if the module has settings
|
||||
if (empty($m->get('settings'))) {
|
||||
// Check if the module exists and has settings
|
||||
if (!$m || empty($m->get('settings'))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$sub->url('settings/apps/' . $m->getAlias(), title_case(str_replace('_', ' ', snake_case($m->getName()))), $position, $attr);
|
||||
$sub->url('settings/apps/' . $module->alias, title_case(str_replace('_', ' ', snake_case($m->getName()))), $position, $attr);
|
||||
|
||||
$position++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user