rename models and associates, isolate botanic with shop
This commit is contained in:
30
app/Datatables/CategoriesDataTable.php
Normal file
30
app/Datatables/CategoriesDataTable.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataTables;
|
||||
|
||||
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'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
->width(120)
|
||||
->addClass('text-center'),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user