Fixes
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Datatables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\Datatables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\ArticleAttributeFamily;
|
||||
|
||||
class ArticleAttributeFamiliesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'ArticleAttributeFamilies';
|
||||
|
||||
public function query(ArticleAttributeFamily $model)
|
||||
{
|
||||
$model = $model::withCount(['values','articles']);
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('name')->title('Nom'),
|
||||
Column::make('values_count')->title('Nb attributs')->searchable(false)->addClass('text-right'),
|
||||
Column::make('articles_count')->title('Nb d\'articles')->searchable(false)->addClass('text-right'),
|
||||
self::makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ class PriceGenericCategoriesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'price-generics';
|
||||
|
||||
public function query(PriceGeneric $model)
|
||||
public function query(PriceGenericCategory $model)
|
||||
{
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user