@php use App\Institution; use App\Course; use App\Department; use App\ScrollingText; use App\Designation; use App\FeedbackQuestion; use App\FeedbackQuestionOption; use App\PageImage; $pageImages = PageImage::where('disp_section', '=', 'hhs')->orderBy('id', 'DESC')->get(); $designations = Designation::orderBy('designation')->get(); $scrollingText = ScrollingText::where(['section' => 'Grievances', 'active' => 'Yes'])->first(); $year_start = date('Y'); $year_end = $year_start + 6; $passout_year = 2013; // Peer Team Visit (Cycle 2) $basePath = '/uploads/IQAC/'; $itemSets = [ [ 'title' => 'Gimps of Peer Team Visit (Cycle-2)', 'folder' => 'CYCLE - 2', 'type' => 'image', ], ]; function getItemsFromFolder($folder, $allowedExtensions = ['webp', 'jpg', 'jpeg', 'png', 'pdf', 'mp4']) { $directory = public_path("{$folder}/"); return collect(File::files($directory))->filter(function ($file) use ($allowedExtensions) { return in_array(strtolower($file->getExtension()), $allowedExtensions); }); } @endphp @extends('frontend.mainlayout') @section('title', 'IEI Student Chapter Committee') @section('banner')

Peer Team Visit (Cycle 2)

@endsection @section('main')
@foreach ($itemSets as $itemSet)
— {{ $itemSet['title'] }}
@foreach (getItemsFromFolder("{$basePath}{$itemSet['folder']}") as $file) @php $itemUrl = asset(rawurlencode("{$basePath}{$itemSet['folder']}/" . $file->getFilename())); @endphp @endforeach
{!! $loop->last ? '' : '
' !!} @endforeach
@endsection