29 lines
653 B
PHP
29 lines
653 B
PHP
<?php
|
|
|
|
namespace App\DataTables\Shop;
|
|
|
|
use Yajra\DataTables\Html\Column;
|
|
use App\DataTables\ParentDataTable as DataTable;
|
|
use App\Models\Shop\ArticleAttributeValue;
|
|
|
|
class ArticleAttributeValuesDataTable extends DataTable
|
|
{
|
|
public $model_name = 'ArticleAttributeValues';
|
|
|
|
public function query(ArticleAttributeValue $model)
|
|
{
|
|
$model = $model::with(['ArticleAttributeFamily']);
|
|
return self::buildQuery($model);
|
|
}
|
|
|
|
protected function getColumns()
|
|
{
|
|
return [
|
|
Column::make('value')->title('Attributs'),
|
|
Column::make('article_attribute_family.name')->title('Famille d\'attributs')->sortable(false),
|
|
self::makeColumnButtons(),
|
|
];
|
|
}
|
|
|
|
}
|