diff --git a/src/Abstractor/Eloquent/FieldFactory.php b/src/Abstractor/Eloquent/FieldFactory.php index 4deb4cd..03dbcff 100644 --- a/src/Abstractor/Eloquent/FieldFactory.php +++ b/src/Abstractor/Eloquent/FieldFactory.php @@ -43,7 +43,8 @@ class FieldFactory implements FieldAbstractorFactoryContract 'password', 'hidden', 'select', - 'file' + 'file', + 'money' ); public function __construct(FormManagerFactory $factory) diff --git a/src/View/Composers/SidebarComposer.php b/src/View/Composers/SidebarComposer.php index 3fd286c..59da7a5 100644 --- a/src/View/Composers/SidebarComposer.php +++ b/src/View/Composers/SidebarComposer.php @@ -51,6 +51,10 @@ private function getSidebarItems() continue; } } + // Remove empty groups (resulting, most probably, of different permissions) + if(count($menuItems[$group]['items']) < 1) { + unset($menuItems[$group]); + } } }