Skip to content

ml-solutions-ltda/table-widget

 
 

Repository files navigation

Nova Table Widget

Latest Version on Packagist Total Downloads License

Nova Table Widget

A table widget for laravel Nova Dashboard.

Installation

You can install the package via composer:

composer require mlsolutions/table-widget

Basic Usage

use MlSolutions\NovaDashboard\Filters;
use MlSolutions\TableWidget\TableWidget;

class UsersWidget extends TableWidget
{
    public function fields(): array
    {
        return [
            Text::make('Name'),
            Number::make('Likes'),
            Number::make('Followers'),
        ];
    }

    public function value(Filters $filters): Collection
    {
        return Collection::range(0, 10)->map(function (int $index) {

            return [
                'name' => fake()->name(),
                'likes' => fake()->numberBetween(0, 1000),
                'followers' => fake()->numberBetween(100, 100000),
            ];

        });
    }
}

⭐️ Show Your Support

Please give a ⭐️ if this project helped you!

Other Packages You Might Like

License

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

About

A table widget for laravel nova-dashboard.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vue 64.1%
  • PHP 19.5%
  • JavaScript 15.8%
  • CSS 0.6%