This commit is contained in:
Ludovic CANDELLIER
2021-11-07 19:58:38 +01:00
parent c7c8e18cbc
commit 63c6671c97
22 changed files with 143 additions and 48 deletions

View File

@@ -13,7 +13,7 @@ class SpeciesDataTable extends DataTable
public function query(Specie $model)
{
$model = $model::withCount(['images','varieties','tags'])->with(['genre','image','tags']);
$model = $model::withCount(['images', 'varieties', 'tags'])->with(['genre', 'image', 'tags']);
return $this->buildQuery($model);
}
@@ -29,7 +29,7 @@ class SpeciesDataTable extends DataTable
->editColumn('tags2', function (Specie $specie) {
$html = '';
foreach ($specie->tags as $tag) {
$html .= '<span class="btn btn-xs btn-secondary pb-2">' . $tag->slug . '</span> ';
$html .= '<span class="btn btn-xs btn-secondary pb-2">' . $tag->slug . '</span> ';
}
return $html;
})