{{ $widget->title }}
@if($widget->type == 'image_link') {{ $widget->title }} @elseif($widget->type == 'video')
@elseif($widget->type == 'text')
{!! $widget->content !!}
@elseif($widget->type == 'calendar') @php $now = \Carbon\Carbon::now(); $currentMonth = $now->format('F Y'); $daysInMonth = $now->daysInMonth; $firstDayOfWeek = $now->copy()->startOfMonth()->dayOfWeek; // 0 (Sun) - 6 (Sat) $today = $now->day; @endphp
{{ $currentMonth }}
@php $cellCount = 0; @endphp @for($i = 0; $i < $firstDayOfWeek; $i++) @php $cellCount++; @endphp @endfor @for($day = 1; $day <= $daysInMonth; $day++) @if($cellCount % 7 == 0 && $cellCount != 0) @endif @php $cellCount++; @endphp @endfor @while($cellCount % 7 != 0) @php $cellCount++; @endphp @endwhile
S M T W T F S
{{ $day }}
@elseif($widget->type == 'link') @endif