@php $leftWidgets = collect($widgets)->filter(function ($widget) { return $widget['align'] === 'left'; }); $rightWidgets = collect($widgets)->filter(function ($widget) { return $widget['align'] === 'right'; }) @endphp
@if(!empty($this->widgets))
@foreach($this->widgets as $key => $widget)
{{trans("dashboard.".$widget['type'])}}
@if($widget['type'] != "appBar")
@endif @if($widget['type'] != "appBar") @endif
@if($widget['type'] == "appBar")
@endif @if($widget['type'] == "text")
@endif @if($widget['type'] == "image")
@endif
@endforeach
@endif
@php $appBarWidget = collect($widgets)->firstWhere('type', '=', 'appBar'); @endphp @if($appBarWidget)
{{$appBarWidget['title']['data']}}
@endif
@foreach($leftWidgets as $index => $leftWidgetInMobile) @if($leftWidgetInMobile['type'] === 'image')
@endif @if($leftWidgetInMobile['type'] === 'text')

{{ $leftWidgetInMobile['data'] }}

@endif @endforeach
@foreach($rightWidgets as $index => $rightWidgetInMobile) @if($rightWidgetInMobile['type'] === 'image')
@endif @if($rightWidgetInMobile['type'] === 'text')

{{ $rightWidgetInMobile['data'] }}

@endif @endforeach
@if(collect($widgets)->count() > 1)
@endif
@script @endscript