Skip to content

dytechltd/nova-custom-table-card

Repository files navigation

Nova Custom Table Card

Simple Nova Card for Custom Tables

This will add a simple table card with specified data.

It can be useful as latest order list or latest posts, ...

Nova Custom Table Card

Installation

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

composer require m-a-k-o/nova-custom-table-card

Youy must register the card with NovaServiceProvider.

// in app/Providers/NovaServiceProvder.php

// ...
public function cards()
{
    return [
        // ...

        // all the parameters are required
        new \Mako\CustomTableCard\CustomTableCard(
            array $header, array $data
        ),
    ];
}

Usage is simple:

// ...
public function cards()
{
    return [
        // ...

        // all the parameters are required
        new \Mako\CustomTableCard\CustomTableCard(
            ['Id', 'Name', 'Date'], // header
            [
              [
                'view' => '/resources/orders/1',
                'columns' => [1, 'John Doe', '2018-08-28']
              ]
            ] // data
        ),
    ];
}

If you don't specify view, show icon will not be visible.

About

Simple Nova Card for Custom Tables

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 63.2%
  • Vue 33.5%
  • JavaScript 3.1%
  • CSS 0.2%