Files
opensem/app/Datatables/Botanic/VarietiesDataTable.php
Ludovic CANDELLIER e370174f94 Botanic release
2020-04-21 19:52:11 +02:00

33 lines
723 B
PHP

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