@foreach ($childs as $child)
    @if ($parent_id == $child->id)
        <option value="{{ $child->id }}" selected>{{ str_pad('', $level, '-') . ' ' . $child->name }}</option>
    @else
        <option value="{{ $child->id }}">{{ str_pad('', $level, '-') . ' ' . $child->name }}</option>
    @endif
    @if (count($child->childs))
        @include('documents.optionChildSelected', [
            'childs' => $child->childs,
            'parent_id' => $document->parent_id,
            'level' => $level + 1,
        ])
    @endif
@endforeach
