@php
function renderFolderOptions($folders, $level = 0) {
    foreach ($folders as $folder) {
        echo '<option value="' . $folder->id . '">' . str_repeat('&nbsp;&nbsp;', $level) . e($folder->name) . '</option>';
        if ($folder->children && $folder->children->count()) {
            renderFolderOptions($folder->children, $level + 1);
        }
    }
}
@endphp
