@php use Illuminate\Database\Eloquent\Model; @endphp @php use Filament\Facades\Filament; @endphp @php use SolutionForest\FilamentTree\Components\Tree; @endphp @props(['record', 'containerKey', 'tree', 'title' => null, 'icon' => null, 'description' => null]) @php /** @var $record Model */ /** @var $containerKey string */ /** @var $tree Tree */ $recordKey = $tree->getRecordKey($record); $parentKey = $tree->getParentKey($record); $children = $record->children; foreach ($children as $key => $child) { if (!$child->canEdit()) { unset($children[$key]); } } $collapsed = $this->getNodeCollapsedState($record); $actions = $tree->getActions(); $isRootItem = $parentKey == -1; @endphp
  • !$isRootItem, 'border-2 !border-gray-900 dark:!border-gray-900' => $isRootItem, ])> @if (!$isRootItem) @endif
    !$isRootItem, 'text-gray-400 dark:text-gray-400' => $isRootItem ]) :record="$record" :title="$title" :icon="$icon" :description="$description" />
    !count($children), 'flex items-center justify-center pl-3'])>
    @if (count($actions))
    @endif
    @if (count($children)) @endif