Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages
R

Resource Navigation Link

Readme

Resource Navigation Link

Latest Version on Packagist Total Downloads License

This package is very similar to the https://github.com/dcasia/resource-navigation-tab (visually they are identical) however internally they works differently.

The main difference is that this package is a Card (not a field), and it links to other resources instead of filtering the current resource

Installation

You can install the package via composer:

composer require digital-creative/resource-navigation-link

Basic Usage

use DigitalCreative\ResourceNavigationLink\ResourceNavigationLink;
use DigitalCreative\ResourceNavigationLink\Link;
use Laravel\Nova\Http\Requests\NovaRequest;

class User extends Resource {

    public function cards(NovaRequest $request): array
    {
        return [
            ResourceNavigationLink::make([
                Link::toResourceIndex(User::class),
                Link::toResourceIndex(Article::class),
                Link::toLens(Article::class, MostViewed::class),
                Link::toExternalUrl('Documentation', 'https://laravel.com/docs/10.x/readme'),
            ]),
        ];
    }

}

/**
 * Optional: if you want to copy the navigation links from another resource
 */
class Article extends Resource {

    public function cards(NovaRequest $request): array
    {
        return [
            ...ResourceNavigationLink::copyFromResource(User::class),
        ];
    }

}

⭐️ Show Your Support

Please give a ⭐️ if this project helped you!

Other Packages You Might Like

License

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

Screenshots

Reviews

By Cord on March 11, 2020

Great to declutter the GUI - very easy to add to existing resources!

Back to Top
Added 5 years ago
Last updated 1 Year Ago
Version v1.1.0
Nova Version ^4.0 || ^5.0
Composer
digital-creative/resource-navigation-link
GitHub stars 11
Packagist downloads 41,107

Favorites

5 users favorited

Rating

5.00
(out of 5)
★★★★★
★★★★
★★★
★★
3 ratings

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas