Attributes
This commit is contained in:
@@ -8,23 +8,25 @@ use App\Models\Shop\ArticleAttributeValue;
|
||||
|
||||
class ArticleAttributeValuesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'ArticleAttributeValues';
|
||||
public $model_name = 'ArticleAttributeValues';
|
||||
|
||||
public function query(ArticleFamily $model)
|
||||
{
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
public function query(ArticleAttributeValue $model)
|
||||
{
|
||||
$model = $model::with(['attribute_family']);
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('name'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
->width(120)
|
||||
->addClass('text-center'),
|
||||
];
|
||||
}
|
||||
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'),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user