[Bug] On relation in HTML Builder
This commit is contained in:
@@ -8,25 +8,21 @@ use App\Models\Botanic\Variety;
|
||||
|
||||
class VarietiesDataTable extends DataTable
|
||||
{
|
||||
public $model_name = 'Varieties';
|
||||
public $model_name = 'Varieties';
|
||||
|
||||
public function query(Variety $model)
|
||||
{
|
||||
$model = $model::with('specie');
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
public function query(Variety $model)
|
||||
{
|
||||
$model = $model::with('specie');
|
||||
return self::buildQuery($model);
|
||||
}
|
||||
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('specie_name')->title('Espèce'),
|
||||
Column::make('name')->title('Nom'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
->width(120)
|
||||
->addClass('text-center'),
|
||||
];
|
||||
}
|
||||
protected function getColumns()
|
||||
{
|
||||
return [
|
||||
Column::make('specie.name')->title('Espèce'),
|
||||
Column::make('name')->title('Nom'),
|
||||
self::makeColumnButtons(),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user