gabrieliuga/laravel-nova-sidebar-links

Allow definition of custom links on Laravel Nova sidebar.
205,668 12
Install
composer require gabrieliuga/laravel-nova-sidebar-links
Latest Version:v1.0.5
PHP:>=7.4.0
Laravel:6 · 7
License:MIT
Last Updated:Mar 4, 2023
Links: GitHub  ·  Packagist
Maintainer: giuga

Laravel nova sidebar links

Build Status Quality Score Latest Version on Packagist StyleCI Total Downloads

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:

Laravel nova menu

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.

Related Packages

maatwebsite/laravel-nova-excel

Supercharged Excel exports for Laravel Nova Resources

7,146,224 401
vyuldashev/nova-permission

A Laravel Nova tool for Spatie's Permission library.

2,646,713 429
spatie/nova-tail-tool

A Laravel Nova tool to display the application log.

129,936 119
spatie/nova-tags-field

A tags field for Nova apps

2,305,323 301
spatie/nova-backup-tool

A Laravel Nova tool to backup your application.

606,582 360

Version History

Version Released PHP Laravel License
v1.0.5 >=7.4.0 >=6.2 MIT
v1.0.4 >=7.4.0 >=6.2 MIT
v1.0.3 >=7.4.0 ^6.2 MIT
v1.0.2 >=7.4.0 ^6.2 MIT
v1.0.1 >=7.4.0 ^6.2 MIT