Skip to content

Commit

Permalink
Merge pull request #17 from osenco/main
Browse files Browse the repository at this point in the history
Show/Hide Menu Item From Navgation
  • Loading branch information
199ocero authored Dec 22, 2024
2 parents 959ea5b + fbea7fd commit c35e8ff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/filachat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/Pages/FilaChat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit c35e8ff

Please sign in to comment.