digital-creative / nova-data-table
A Laravel Nova card.
Installs: 12 495
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 2
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2024-11-04 16:22:26 UTC
README
A Laravel Nova Data Table Component
Installation
You can install the package via composer:
composer require digital-creative/nova-data-table
Basic Usage
class ExampleNovaResource extends Resource { public function cards(Request $request) { return [ (new NovaDataTable()) ->columns( [ new Columns('Name', 'name'), new Columns('Age', 'age'), new Columns('Address', 'address'), ] )->data([ [ 'name' => 'Richard Needham', 'address' => '9293 South Peachtree Drive Rahway, NJ 07065', 'age' => 18 ], [ 'name' => 'Cari Mckenzie', 'address' => '8478 Tallwood St.Far Rockaway, NY 11691', 'age' => 24, ], [ 'name' => 'Daniella Connor', 'address' => '7674 Hilltop Road Mcdonough, GA 30252', 'age' => 33 ], [ 'name' => 'Lamar Mac', 'address' => '67 Thorne Circle New Brunswick, NJ 08901', 'age' => 44 ] ]) ->rowLabels([ 'Label1', 'Label2', 'Label2', 'Label3', ]) ]; } }
License
The MIT License (MIT). Please see License File for more information.