Add new version in repository

This commit is contained in:
Ludovic CANDELLIER
2021-07-25 23:19:27 +02:00
parent d174fe1c81
commit 0d421226fa
608 changed files with 12235 additions and 7513 deletions

View File

@@ -8,21 +8,20 @@ use App\Models\Shop\Category;
class CategoriesDataTable extends DataTable
{
public $model_name = 'categories';
public $model_name = 'categories';
public function query(Category $model)
{
$model = $model::withCount('articles');
return self::buildQuery($model);
}
protected function getColumns()
{
return [
Column::make('name')->title('Nom'),
Column::make('articles_count')->title('Nb Articles')->class('text-right')->searchable(false),
self::makeColumnButtons(),
];
}
public function query(Category $model)
{
$model = $model::withCount('articles');
return self::buildQuery($model);
}
protected function getColumns()
{
return [
Column::make('name')->title('Nom'),
Column::make('articles_count')->title('Nb Articles')->class('text-right')->searchable(false),
self::makeColumnButtons(),
];
}
}