Fix on AdminLTE 3, and add some features
This commit is contained in:
31
app/DataTables/Shop/ArticlePricesDataTable.php
Normal file
31
app/DataTables/Shop/ArticlePricesDataTable.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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'),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user