33 lines
705 B
PHP
33 lines
705 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'),
|
|
Column::computed('action')
|
|
->exportable(false)
|
|
->printable(false)
|
|
->width(120)
|
|
->addClass('text-center'),
|
|
];
|
|
}
|
|
|
|
}
|