Calender help ! php / laravel / blade / frontend

Hello
3 Replies
NIMA
NIMAOP4mo ago
@foreach ($days as $dayKey => $dayLabel)
<tr class="even:bg-zinc-50 dark:even:bg-zinc-800 odd:bg-white dark:odd:bg-zinc-900">
<td class="p-2 border border-neutral-300 dark:border-neutral-700 font-medium text-center">
{{ $dayLabel }}
</td>
@foreach ($timeSlots as $time)
<td class="p-1 border border-neutral-300 dark:border-neutral-700 min-h-[48px] align-top text-xs">
@if (!empty($calendarData[$dayKey]))
@foreach ($calendarData[$dayKey] as $class)

@php
$startTime = substr($class['start_at'], 0, 5);
$endTime = substr($class['end_at'], 0, 5);
@endphp

@if ($startTime == $time)

<div x-data="{ show: false }"
showing stuff ......
</div>

@endif
@endforeach
@endif
</td>
@endforeach
</tr>
@endforeach
@foreach ($days as $dayKey => $dayLabel)
<tr class="even:bg-zinc-50 dark:even:bg-zinc-800 odd:bg-white dark:odd:bg-zinc-900">
<td class="p-2 border border-neutral-300 dark:border-neutral-700 font-medium text-center">
{{ $dayLabel }}
</td>
@foreach ($timeSlots as $time)
<td class="p-1 border border-neutral-300 dark:border-neutral-700 min-h-[48px] align-top text-xs">
@if (!empty($calendarData[$dayKey]))
@foreach ($calendarData[$dayKey] as $class)

@php
$startTime = substr($class['start_at'], 0, 5);
$endTime = substr($class['end_at'], 0, 5);
@endphp

@if ($startTime == $time)

<div x-data="{ show: false }"
showing stuff ......
</div>

@endif
@endforeach
@endif
</td>
@endforeach
</tr>
@endforeach
im making a school mangment project and im making a calender for classes so it show teacher and class its work fine but i want show full time in calender rn if a teacher have class at 8 to 10 clock it will only show in 1 td like thsi | | | this | but i want do something it show in 4 of them |this | this| this| this table is from 5 to 23 and its for every 30 minut i try to give col span but it wont work ...
NIMA
NIMAOP4mo ago
No description
NIMA
NIMAOP4mo ago
🤔 🧐

Did you find this page helpful?