v8enginephp/tabler

Table component for Laravel Models

v1.0.0 2022-03-12 18:15 UTC

This package is auto-updated.

Last update: 2024-05-05 01:14:41 UTC


README

Make Your Index Tables Like Piece of Cake

Installation

Install Tabler with composer

    composer require v8enginephp/tabler 

Usage/Examples

use V8\Tabler;


class Test
{
    use Tabler;
    
    protected static function getDefaultColumns(): array
    {
        return [
            tabler_column('slug','column header',function($row){
                // This function executes the number of your records and passes $row argument as the current row record
                // by default if You dont fill this argument Table will fill with $row->slug
                return $row->id;
            }),
        ];
    } 
}

In view

    <?=Test::renderTable($records)?>

In Blade

   {!! Test::renderTable($records) !!}

Authors