Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 1.27 KB

README.md

File metadata and controls

63 lines (46 loc) · 1.27 KB

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.