wamesk / laravel-nova-menu-switcher
Installs: 155
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/wamesk/laravel-nova-menu-switcher
Requires
- php: ^8.0
- laravel/nova: ^4.0
- norman-huth/nova-menu: ^1.7
This package is auto-updated.
Last update: 2025-10-07 08:35:22 UTC
README
Description
Creates input select that refreshes page and sets value to session.
Installation
composer require wamesk/laravel-nova-menu-switcher
Usage
// NovaServiceProvider.php Nova::mainMenu(function (Request $request) { return [ ... Switcher::make([ 'value1' => 'option1', 'value2' => 'option2', 'value3' => 'option3', ], 'option', 'value2'), ... ]; });
If you want to control who can use switcher you can add can_use_switcher attribute in user
// User.php public function getCanUseSwitcherAttribute(): bool { return $this->is_super_admin; }