@extends("admin.layouts.app") @section("title", __("admin.dashboard.title")) @section("content")
@foreach($widgetOutput as $key => $item) @php $widget = $item['widget']; $cols = $widget->getColumns(); @endphp @if($cols === 4) {{-- Full-width widget --}}
{!! $item['html'] !!}
@else @if($loop->first || ($widgetOutput[array_keys($widgetOutput)[$loop->index - 1] ?? '']['widget'] ?? null)?->getColumns() === 4 || $cols === 2 && !isset($gridOpen)) @php $gridOpen = true; @endphp
@endif
{{ $widget->getTitle() }} {{ $widget->getDescription() }}
{!! $item['html'] !!}
@if($loop->last)
@php unset($gridOpen); @endphp @endif @endif @endforeach
@endsection