diff --git a/config/filachat.php b/config/filachat.php index 1f4fb0e..300f963 100644 --- a/config/filachat.php +++ b/config/filachat.php @@ -14,6 +14,18 @@ */ 'enable_roles' => true, + /* + |-------------------------------------------------------------------------- + | Show menu item + |-------------------------------------------------------------------------- + | + | This option controls whether this plugin registers a menu item in the + | sidebar. If disabled, you can manually register a navigation item in a + | different part of the panel. + | + */ + 'show_in_menu' => true, + /* |-------------------------------------------------------------------------- | User Model diff --git a/src/Pages/FilaChat.php b/src/Pages/FilaChat.php index c894ab2..5762331 100644 --- a/src/Pages/FilaChat.php +++ b/src/Pages/FilaChat.php @@ -20,6 +20,11 @@ public static function getSlug(): string return config('filachat.slug') . '/{id?}'; } + public static function shouldRegisterNavigation(): bool + { + return config('filachat.show_in_menu', true); + } + public static function getNavigationLabel(): string { return __(config('filachat.navigation_label'));