We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c91f416 commit bc3d597Copy full SHA for bc3d597
src/controllers/FolderController.php
@@ -29,10 +29,15 @@ public function getFolders()
29
foreach ($folder_types as $folder_type => $lang_key) {
30
$root_folder_path = parent::getRootFolderPath($folder_type);
31
32
+ $children = parent::getDirectories($root_folder_path);
33
+ usort($children, function ($a, $b) {
34
+ return strcmp($a->name, $b->name);
35
+ });
36
+
37
array_push($root_folders, (object)[
38
'name' => trans('laravel-filemanager::lfm.title-' . $lang_key),
39
'path' => parent::getInternalPath($root_folder_path),
- 'children' => parent::getDirectories($root_folder_path),
40
+ 'children' => $children,
41
'has_next' => !($lang_key == end($folder_types))
42
]);
43
}
0 commit comments