Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show/Hide Menu Item From Navgation #17

Merged
merged 3 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading