beyondcode/nova-custom-dashboard-card 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

beyondcode/nova-custom-dashboard-card

最新稳定版本:0.0.1

Composer 安装命令:

composer require beyondcode/nova-custom-dashboard-card

包简介

A Laravel Nova dashboard card that allows you to build custom dashboards.

README 文档

README

Latest Version on Packagist Total Downloads

This package lets you create customizable dashboards for every Nova user.

screenshot

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require beyondcode/nova-custom-dashboard-card

Next up, you must register the card with Nova. This is typically done in the cards method of the NovaServiceProvider.

// in app/Providers/NovaServiceProvder.php

// ...
public function cards()
{
    return [
        // ...
        new \Beyondcode\CustomDashboardCard\CustomDashboard,
    ];
}

Define available cards

Similar to Nova itself, you can define all cards that should be available for selection in the Add Card modal.

All these cards follow the same authorization rules as any other Nova card - so you do not need to worry about this.

You can register them in your NovaServiceProvider

// in app/Providers/NovaServiceProvder.php

use Beyondcode\CustomDashboardCard\NovaCustomDashboard;

public function boot()
{
    parent::boot();

    NovaCustomDashboard::cards([
        new UsersPerDay,
        new TotalUsers,
        new TotalAwesomeUsers,
        // ... all cards you want to be available 
    ]);
}

Define custom card names

If you want to define a custom card name, that will be shown in the modal, pass it to the card as a card-name meta attribute, like this:

NovaCustomDashboard::cards([
    (new LaravelUpdateCard)->withMeta([
        'card-name' => 'Laravel Updates Available'
    ]),
]);

Usage

Visit your Nova dashboard and click the Add Card button to add new cards to the customized dashboard. The custom dashboard will be stored in localstorage for every user.

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email marcel@beyondco.de instead of using the issue tracker.

Credits

License

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

统计信息

  • 总下载量: 55.19k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 84
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 83
  • Watchers: 3
  • Forks: 16
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-22