Files
opensem/app/DataTables/Shop/ArticlePricesDataTable.php
2020-05-09 01:05:55 +02:00

32 lines
608 B
PHP

<?php
namespace App\DataTables\Shop;
use Yajra\DataTables\Html\Column;
use App\DataTables\ParentDataTable as DataTable;
use App\Models\Shop\ArticlePrice;
class ArticlePricessDataTable extends DataTable
{
public $model_name = 'ArticlePrices';
public function query(ArticlePrice $model)
{
$model = $model::with(['Article', 'ArticleAttributes']);
return self::buildQuery($model);
}
protected function getColumns()
{
return [
Column::make('name'),
Column::computed('action')
->exportable(false)
->printable(false)
->width(120)
->addClass('text-center'),
];
}
}