Code Monkey home page Code Monkey logo

nova-custom-dashboard-card's Introduction

Nova Custom Dashboard Card

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 [email protected] instead of using the issue tracker.

Credits

License

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

nova-custom-dashboard-card's People

Contributors

krato avatar mpociot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nova-custom-dashboard-card's Issues

Code Description in Nova Packages is wrong

Hi:

so here : https://novapackages.com/packages/beyondcode/nova-custom-dashboard-card ,

In the section Define available cards, it writes:

// in app/Providers/NovaServiceProvder.php

use Beyondcode\CustomDashboardCard\CustomDashboard;

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

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

Where it is supposed to be :

// 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 
    ]);
}

Thanks for the awesome plugin btw.

Cheers ๐Ÿ˜„

Can i set default card ?

There is a way that i can set some default card?
for when i'm opening nova on dashboard i need it to set default card to show that doesn't need to click on "add" button and be able to drag and delete.

Gridstack required?

I noticed gridstack is in the package.json dependencies but doesn't seem to be used. Is it required for this package or was it replaced by vue-grid-layout?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.