This commit is contained in:
Ludovic CANDELLIER
2021-03-27 01:16:37 +01:00
parent 22fa3d3246
commit 4855254a7f
21 changed files with 219 additions and 137 deletions

View File

@@ -32,9 +32,10 @@ class Varieties
$data = [];
foreach ($varieties as $variety)
{
$data[] = ['id' => $variety->id, 'text' => (isset($variety->specie->name) ? $variety->specie->name . ' ' : '') . $variety->name];
$data[$variety->id] = (isset($variety->specie->name) ? $variety->specie->name . ' ' : '') . $variety->name;
}
return collect($data)->sortBy('text')->values()->all();
asort($data, SORT_NATURAL | SORT_FLAG_CASE);
return $data;
}
public static function getAll()