Adds link to the Laravel Vapor UI Dashboard in the Laravel Nova sidebar.
Link automatically hidden if current user hasn't access to the Vapor UI Dashboard based on the viewVaporUI
gate defined
in your App\Providers\VaporUiServiceProvider::gate
method. In order to be consistent with Vapor UI it will always show
on local
and testing
environments. For more information, checkout the documentation.
At first, install via composer:
composer require fidum/laravel-nova-vapor-ui-link
Next up, register the link in the tools
method of the NovaServiceProvider
:
// app/Providers/NovaServiceProvider.php
// ...
public function tools()
{
return [
new \Fidum\NovaVaporUILink\VaporUILink,
];
}
By default, link label is - Vapor UI, if you prefer to customize it, just pass new label text into constructor:
// app/Providers/NovaServiceProvider.php
public function tools()
{
return [
new \Fidum\NovaVaporUILink\VaporUILink('Custom Label'),
// or
\Fidum\NovaVaporUILink\VaporUILink::make('Custom Label')
];
}
If you need to customize link target
attribute (for example to open a page in a new tab), just pass it as second parameter into constructor.
A value should be without prepended underscore _
:
// app/Providers/NovaServiceProvider.php
public function tools()
{
return [
new \Fidum\NovaVaporUILink\VaporUILink(null, 'blank'),
// or
\Fidum\NovaVaporUILink\VaporUILink::make()->target('blank'),
];
}
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email :author_email instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.