fix categories order
This commit is contained in:
@@ -187,9 +187,18 @@ class NavController extends Controller
|
||||
|
||||
usort($items, function ($a, $b) use ($categoriesLabels) {
|
||||
foreach ($categoriesLabels as $key => $value) {
|
||||
if ($a['categoryId'] === 'other') {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ($b['categoryId'] === 'other') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ($a['categoryId'] === $key) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ($b['categoryId'] === $key) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user