summaryrefslogtreecommitdiff
path: root/workbench/app/Livewire/ProductsTable.php
blob: 26137bc661a8821d323f5c47be5ff11d7e59a421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

namespace Workbench\App\Livewire;

use Workbench\App\Models\Product;

use Lightscale\LaralightTables\TableComponent;
use Lightscale\LaralightTables\Columns\Column;

class ProductsTable extends TableComponent
{
    protected $model = Product::class;

    public function columns(): array
    {
        return [
            Column::make('id', 'ID'),
            Column::make('name', 'Name'),
            Column::make('price', 'Price'),
            Column::make('stock', 'Stock'),
        ];
    }
}