Fixes on reordering categories

This commit is contained in:
Ludovic CANDELLIER
2020-07-06 00:35:08 +02:00
parent 0ad31dac19
commit d8bd1a1713
11 changed files with 148 additions and 29 deletions

View File

@@ -12,6 +12,7 @@ class CategoriesDataTable extends DataTable
public function query(Category $model)
{
$model = $model::withCount('articles');
return self::buildQuery($model);
}
@@ -19,6 +20,7 @@ class CategoriesDataTable extends DataTable
{
return [
Column::make('name')->title('Nom'),
Column::make('articles_count')->title('Nb Articles')->class('text-right')->searchable(false),
self::makeColumnButtons(),
];
}

View File

@@ -9,6 +9,7 @@ use App\Models\Shop\Tag;
class TagsDataTable extends DataTable
{
public $model_name = 'Tags';
public $rowReorder = ['selector' => 'tr'];
public function query(Tag $model)
{