Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages

Installation Instructions

Install using composer:

composer require vmitchell85/nova-links

Next up, you must register the tool with Nova. This is typically done in the tools method of the NovaServiceProvider.

// in app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        (new \vmitchell85\NovaLinks\Links())
            ->add('Nova Packages', 'https://novapackages.com'),
    ];
}

Readme

A Laravel Nova package to display custom links in the sidebar navigation

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.

Screenshots

Back to Top
Added 7 years ago
Last updated 2 Years Ago
Version v2.1
Nova Version ^4.0
Composer
vmitchell85/nova-links
GitHub stars 36
Packagist downloads 524,936

Favorites

12 users favorited

Rating

3.00
(out of 5)
★★★★★
★★★★
★★★
★★
1 ratings

Contributors

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas