[WIP] Add some classes

This commit is contained in:
Ludovic CANDELLIER
2020-04-25 01:06:04 +02:00
parent e0fecd1a6e
commit 516ec2232e
36 changed files with 814 additions and 131 deletions

View File

@@ -12,7 +12,7 @@ class GenresDataTable extends DataTable
public function query(Genre $model)
{
$model = $model::with('family')->withCount('species');
$model = $model::with('family')->withCount('species')->withCount('varieties');
return self::buildQuery($model);
}
@@ -24,6 +24,7 @@ class GenresDataTable extends DataTable
Column::make('latin'),
Column::make('family.name'),
Column::make('species_count')->title('Nb Espèces')->searchable(false),
Column::make('varieties_count')->title('Nb Variétés')->searchable(false),
Column::computed('action')
->exportable(false)
->printable(false)