New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

vmitchell85/nova-links

Add custom links to your nova navigation
549,831 35
Install
composer require vmitchell85/nova-links
Latest Version:v2.1
PHP:^7.3|^8.0
License:MIT
Last Updated:Mar 23, 2023
Links: GitHub  ·  Packagist
Maintainer: vmitchell85

Latest Version on Packagist Total Downloads

'Header Image'

This package leets you add any number of links to the Nova sidebar.

Note: For Nova 3 or earlier use version 1.x

Installation

You can install the package via composer:

composer require vmitchell85/nova-links

Usage

Register the tool in the tools method of the NovaServiceProvider.

// app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        (new \vmitchell85\NovaLinks\Links('Documentation'))
            ->addExternalLink('Laravel Docs', 'https://laravel.com/docs')
            ->addExternalLink('Nova Docs', 'https://nova.laravel.com/docs')
    ];
}

Examples

Add internal links or external links calling the addLink or addExternalLink methods respectively.

// app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        (new \vmitchell85\NovaLinks\Links('All Links'))
            ->addLink('Nova Main', '/')
            ->addExternalLink('Laravel Docs', 'https://laravel.com/docs'),
    ];
}

You can also change the navigation label by passing a string to the constructor:

// app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        (new \vmitchell85\NovaLinks\Links('Quick Links'))
            ->addLink('Nova Main', '/')
            ->addExternalLink('Frontend', url('/')),

        (new \vmitchell85\NovaLinks\Links('Laravel-related News'))
            ->addExternalLink('Laravel Blog', 'https://blog.laravel.com')
            ->addExternalLink('Laravel News', 'https://laravel-news.com'),
    ];
}

To open a link in a new browser window, set the third parameter on addLink or addExternalLink to true:

// app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        (new \vmitchell85\NovaLinks\Links('Laravel-related News'))
            ->addLink('Nova Main', '/', true)
            ->addExternalLink('Laravel News', 'https://laravel-news.com', true),
    ];
}

License

The MIT License (MIT). Please see License File for more information.

Related Packages

epartment/nova-dependency-container

A Laravel Nova field container allowing to depend on other fields values

4,703,233 378
eminiarts/nova-tabs

Laravel Nova - Tabs.

4,610,439 464
ebess/advanced-nova-media-library

Laravel Nova tools for managing the Spatie media library.

3,888,853 616
spatie/nova-tags-field

A tags field for Nova apps

2,356,168 301
kabbouchi/nova-impersonate

A Laravel Nova field allows you to authenticate as your users.

2,268,645 234

Version History

Version Released PHP License
v2.1 ^7.3|^8.0 MIT
V2.0.1 ^7.3|^8.0 MIT
v2.0 >=7.1.0 MIT
v1.1 >=7.1.0 MIT
1.0.2 >=7.1.0 MIT
Pre-releases (1)
Version Released PHP License
v2.0RC ^7.3|^8.0 MIT