cleaning day
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Datatables\Admin\Shop;
|
||||
|
||||
use App\Datatables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\PriceGenericCategory;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
|
||||
class PriceGenericCategoriesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'price_generic_categories';
|
||||
|
||||
public function query(PriceGenericCategory $model)
|
||||
{
|
||||
$model = $model->withCount('price_generics');
|
||||
|
||||
return $this->buildQuery($model);
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('name')->title('Nom'),
|
||||
Column::make('price_generics_count')->title('Nb Tarifs')->class('text-right'),
|
||||
$this->makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -174,6 +174,13 @@ class ParentDataTable extends DataTable
|
||||
return "<'row pt-3 dt-toolbar-footer'<'col-md-6'i><'col-md-6'p>>";
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
$this->makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
protected function filename(): string
|
||||
{
|
||||
return self::buildFilename($this->model_name);
|
||||
|
||||
Reference in New Issue
Block a user