27 lines
445 B
PHP
27 lines
445 B
PHP
<?php
|
|
|
|
namespace App\DataTables\Shop;
|
|
|
|
use Yajra\DataTables\Html\Column;
|
|
use App\DataTables\ParentDataTable as DataTable;
|
|
use App\Models\Shop\Category;
|
|
|
|
class CategoriesDataTable extends DataTable
|
|
{
|
|
public $model_name = 'Categories';
|
|
|
|
public function query(Category $model)
|
|
{
|
|
return self::buildQuery($model);
|
|
}
|
|
|
|
protected function getColumns()
|
|
{
|
|
return [
|
|
Column::make('name')->title('Nom'),
|
|
self::makeColumnButtons(),
|
|
];
|
|
}
|
|
|
|
}
|