Botanic release

This commit is contained in:
Ludovic CANDELLIER
2020-04-21 19:52:11 +02:00
parent 4ad1f18310
commit e370174f94
10 changed files with 23 additions and 23 deletions

View File

@@ -0,0 +1,32 @@
<?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'),
];
}
}