gabrieliuga / laravel-nova-sidebar-links
Allow definition of custom links on Laravel Nova sidebar.
Installs: 173 727
Dependents: 0
Suggesters: 0
Security: 0
Stars: 13
Watchers: 1
Forks: 5
Open Issues: 5
Requires
- php: >=7.4.0
- laravel/framework: >=6.2
- laravel/nova: >=2.9
Requires (Dev)
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-11-04 04:42:12 UTC
README
Add links to your nova backend
Installation
You can install the package via composer:
composer require gabrieliuga/laravel-nova-sidebar-links
Usage
NovaServiceProvider.php <?php namespace App\Providers; use Giuga\LaravelNovaSidebar\NovaSidebar; use Giuga\LaravelNovaSidebar\SidebarGroup; use Giuga\LaravelNovaSidebar\SidebarLink; ... public function tools() { return [ (new NovaSidebar()) ->addGroup((new SidebarGroup()) ->setName('Utilities') ->addLink((new SidebarLink()) ->setName('Telescope') ->setType('_blank') ->setUrl('/telescope') ) ->addLink((new SidebarLink()) ->setName('Horizon') ->setType('_blank') ->setUrl('/horizon') ) ) ->addLink((new SidebarLink()) ->setUrl('https://google.com') ->setType('_blank') ->setName('Google') ) ]; } OR public function tools() { return [ (new NovaSidebar())->hydrate([ 'Utilities' => [ ['Telescope', '/telescope'], ['Horizon', '/horizon'], ['Google', 'https://google.com', '_self'] ], 'Google 2' => 'https://google.com' ]) ]; }
The result of the above will be:
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email me@iuga.dev instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.