在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):chris-ware/nova-breadcrumbs开源软件地址(OpenSource Url):https://github.com/chris-ware/nova-breadcrumbs开源编程语言(OpenSource Language):PHP 47.7%开源软件介绍(OpenSource Introduction):Nova BreadcrumbsBreadcrumbs for Laravel Nova InstallationYou can install the package in to a Laravel app that uses Nova via composer: composer require chris-ware/nova-breadcrumbs Next, you must register the tool with Nova. This is typically done in the // in app/Providers/NovaServiceProvder.php
// ...
public function tools()
{
return [
// ...
\ChrisWare\NovaBreadcrumbs\NovaBreadcrumbs::make(),
];
} Finally, add the Breadcrumbs trait to your App\Nova\Resource class. use ChrisWare\NovaBreadcrumbs\Traits\Breadcrumbs;
abstract class Resource extends NovaResource
{
use Breadcrumbs; CustomisationYou can disable the bundled styles and load your own by adding the following method to the call: // in app/Providers/NovaServiceProvder.php
// ...
public function tools()
{
return [
// ...
\ChrisWare\NovaBreadcrumbs\NovaBreadcrumbs::make()->withoutStyles(),
];
} You can also customise both the label and title for a Resource. Label refers to the Resource's Name, so a Users Resource would have a Users label. Title refers to the title of the Resource as set by the $title property on the resource, so by default it would be the resource ID. Both of these can be overwritten for Breadcrumbs only by overwriting the functions on the trait that start with breadcrumb. You can also conditionally disable breadcrumbs, using the static breadcrumbs method presented in the trait. InformationThis package works using the custom header elements available on all Nova views. Due to the fact that the data available to these views differ, the rendering of breadcrumbs is API powered, to ensure that for all views, the necessary data is available and displayed. ScreenshotsScreenshots can be seen here. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论