A Laravel Nova dashboard card that allows you to build custom dashboards.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 9afc963 Aug 22, 2018
Permalink
Failed to load latest commit information.
dist Update assets Aug 22, 2018
resources Initial commit Aug 22, 2018
routes Initial commit Aug 22, 2018
src Initial commit Aug 22, 2018
tests Initial commit Aug 22, 2018
.gitignore Initial commit Aug 22, 2018
.scrutinizer.yml Initial commit Aug 22, 2018
.styleci.yml Initial commit Aug 22, 2018
.travis.yml Initial commit Aug 22, 2018
CHANGELOG.md Initial commit Aug 22, 2018
CONTRIBUTING.md Initial commit Aug 22, 2018
LICENSE.md Initial commit Aug 22, 2018
README.md Update README.md Aug 22, 2018
composer.json Initial commit Aug 22, 2018
mix-manifest.json Initial commit Aug 22, 2018
package.json Initial commit Aug 22, 2018
phpunit.xml.dist Initial commit Aug 22, 2018
webpack.mix.js Initial commit Aug 22, 2018
yarn.lock Initial commit Aug 22, 2018

README.md

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 marcel@beyondco.de instead of using the issue tracker.

Credits

License

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