• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

chris-ware/nova-breadcrumbs: Breadcrumbs for Laravel Nova

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

chris-ware/nova-breadcrumbs

开源软件地址(OpenSource Url):

https://github.com/chris-ware/nova-breadcrumbs

开源编程语言(OpenSource Language):

PHP 47.7%

开源软件介绍(OpenSource Introduction):

Nova Breadcrumbs

Breadcrumbs for Laravel Nova

Latest Stable Version Total Downloads License StyleCI

Installation

You 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 tools method of the NovaServiceProvider.

// 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;

Customisation

You 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.

Information

This 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.

Screenshots

Screenshots can be seen here.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap