@foreach ($childs as $child)
    <tr>
        <td class="p-2 border border-gray-200">
            {{ str_pad('', $level, '-') . ' ' . $child->name }}
        </td>
        <td class="p-2 border border-gray-200">
            @include('documents.actions', ['document' => $child])
        </td>
    </tr>
    @if (count($child->childs))
        @include('documents.tableChild', [
            'childs' => $child->childs,
            'level' => $level + 1,
        ])
    @endif
@endforeach
