Sort folders by natural name
parent
1dd0c2b23a
commit
2242d2b4d9
|
@ -146,6 +146,11 @@ class ApiController extends Controller {
|
||||||
return $item->getParent()->getId() === $node->getId();
|
return $item->getParent()->getId() === $node->getId();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Sort by name
|
||||||
|
usort($sub, function($a, $b) {
|
||||||
|
return strnatcmp($a->getName(), $b->getName());
|
||||||
|
});
|
||||||
|
|
||||||
// Map sub to JSON array
|
// Map sub to JSON array
|
||||||
$subdirArray = [
|
$subdirArray = [
|
||||||
"day_id" => -0.1,
|
"day_id" => -0.1,
|
||||||
|
|
Loading…
Reference in New Issue