Update with new price management
This commit is contained in:
28
app/DataTables/Shop/UnitiesDataTable.php
Normal file
28
app/DataTables/Shop/UnitiesDataTable.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataTables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\DataTables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\Unity;
|
||||
|
||||
class UnitiesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'Unity';
|
||||
|
||||
public function query(Unity $model)
|
||||
{
|
||||
$model = $model::with(['price_family']);
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('value')->title('Attributs'),
|
||||
Column::make('price_family.name')->title('Famille')->orderable(false),
|
||||
self::makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user