@foreach ($eventDays as $key => $eventDay)
@foreach ($eventDay->eventParentSessions as $eventSession) @foreach ($eventSession->subSessions as $subSession) @php $eventSessionAllUsers = []; @endphp @php $facultyNames = null; $facultyNames = $subSession->eventSessionFaculties->pluck('name')->toArray() ?? ''; $speakerNames = null; $speakerNames = $subSession->eventSessionSpeakers->pluck('name')->toArray() ?? ''; @endphp @if (!empty($facultyNames)) @php $eventSessionAllUsers = array_merge( $eventSessionAllUsers, $facultyNames, ); @endphp @endif @foreach ($event->eventDesignations as $eventDesignation) @php $eventSessionUserNames = $subSession ->eventSessionUsers() ->wherePivot('event_designation_id', $eventDesignation->id) ->pluck('name') ->toArray(); @endphp @if (!empty($eventSessionUserNames)) @php $eventSessionAllUsers = array_merge( $eventSessionAllUsers, $eventSessionUserNames, ); @endphp @endif @endforeach {{-- @dd($eventSessionAllUsers); --}} @if (!empty($speakerNames)) @else @endif @if (!empty($eventSessionAllUsers)) @else @endif {{-- @foreach ($event->eventDesignations as $eventDesignation) @endforeach --}} @endforeach @endforeach
{{ $eventSession->title ?? '' }}
Topic: {{ $eventSession->topic ?? '' }}
@foreach ($event->eventDesignations as $eventDesignation) @php $eventSessionUserNames = null; $eventSessionUserNames = $eventSession ->eventSessionUsers() ->wherePivot( 'event_designation_id', $eventDesignation->id, ) ->pluck('name') ->toArray() ?? ''; @endphp @if (!empty($eventSessionUserNames))
{{ $eventDesignation->designation }}: @foreach ($eventSessionUserNames as $key => $eventSessionUserName) {{ $eventSessionUserName }} @if ($key < count($eventSessionUserNames) - 1) , @endif @endforeach
@endif @endforeach @php $facultyNames = null; $facultyNames = $eventSession->eventSessionFaculties ->pluck('name') ->toArray() ?? ''; @endphp @if (!empty($facultyNames))
Faculty: @foreach ($facultyNames as $key => $facultyName) {{ $facultyName }} @if ($key < count($facultyNames) - 1) , @endif @endforeach
@endif @if ($eventSession->eventHall)
Hall: {{ $eventSession->eventHall->name }}
@endif
Time: {{ getFormattedDates($eventSession->start_time, 'h:i A') }}- {{ getFormattedDates($eventSession->end_time, 'h:i A') }}
Time Topic Speaker Chairperson / Panelists / Faculty
{{ getFormattedDates($subSession->start_time, 'h:i A') }}- {{ getFormattedDates($subSession->end_time, 'h:i A') }} {{ $subSession->topic ?? '-' }} @foreach ($speakerNames as $key => $speaker) {{ $speaker ?? '' }} @if ($key < count($speakerNames) - 1) | @endif @endforeach - @foreach ($eventSessionAllUsers as $key => $eventSessionAllUsersName) {{ $eventSessionAllUsersName ?? '' }} @if ($key < count($eventSessionAllUsers) - 1) | @endif @endforeach - oooo
@endforeach