@extends('layout.layout') @php $title = 'Departments'; $subTitle = $department->name; @endphp @section('content') @include('components.alert')
@csrf @method('PUT')
@foreach ($tabs->where('children', '!=', null)->filter(fn($tab) => $tab->children->count() > 0) as $parent)
tabs->contains($parent->id) ? 'checked' : '' }}>
Order
{{ $parent->children->count() + 1 }}
@foreach ($parent->children as $child)
tabs->contains($child->id) ? 'checked' : '' }}>
@endforeach
@endforeach @php $noChildrenTabs = $tabs->filter(fn($tab) => $tab->children->count() == 0); @endphp @if ($noChildrenTabs->count() > 0)
{{ $noChildrenTabs->count() }}
@foreach ($noChildrenTabs as $tab)
tabs->contains($tab->id) ? 'checked' : '' }}>
@endforeach
@endif
@endsection @push('scripts') @endpush