@if ($sidebars)

@lang('widgets.availableWidgets')


@if (is_array($widgets)) @php $widgets = collect($widgets); $half = ceil($widgets->count() / 2); $widgetsSlice = $widgets->chunk($half); @endphp
@foreach ($widgetsSlice as $widgets)
@foreach ($widgets as $index => $widget)
{{ app($widget)->get_description() }}
@endforeach
@endforeach
@endif
@php $half = ceil($sidebars->count() / 2); $sidebarsSlice = $sidebars->chunk($half); @endphp @foreach ($sidebarsSlice as $sidebars)
@foreach ($sidebars as $key => $sidebar)
{{ $sidebar->title }}
@if ($sidebar->widgets->count()) @foreach ($sidebar->widgets as $sidebar_widget) @if (method_exists($sidebar_widget->name, 'build')) {{ app($sidebar_widget->name)->build($sidebar->name, $sidebar_widget) }} @endif @endforeach @endif
@endforeach
@endforeach
@endif
@section('footer_scripts') @endsection