Files
opensem/app/DataTables/Shop/ArticleAttributeValuesDataTable.php
2020-05-11 02:52:28 +02:00

29 lines
603 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(['attribute_family']);
return self::buildQuery($model);
}
protected function getColumns()
{
return [
Column::make('attribute_family.name')->title('Famille d\'attributs') ,
Column::make('value'),
self::makeColumnButtons(),
];
}
}