Create links to internal or external resources.
digital-creative/resource-navigation-link is a Laravel package for create links to internal or external resources..
It currently has 10 GitHub stars and 47.514 downloads on Packagist (latest version v1.1.0).
Install it with composer require digital-creative/resource-navigation-link.
Discover more Laravel packages by digital-creative
or browse all Laravel packages to compare alternatives.
Last updated
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
You can install the package via composer:
composer require digital-creative/resource-navigation-link
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),
];
}
}
Please give a ⭐️ if this project helped you!
Help card that comes with Nova.The MIT License (MIT). Please see License File for more information.