@extends('frontend.mainlayout')
@section('title', 'Events (EEE Department)')
@section('banner')
Events (EEE Department)
{{--
Welcome to RERF Group of Institutions' NSS Cell,
empowering students through
community service and social impact.
--}}
@endsection
@section('main')
@php
$baseImagePath = 'uploads/Events/Bachelor of Technology/Electrical and Electronic Engineering/';
$imageSets = [
[
'title' => "TEACHERS' DAY 2K23",
'folder' => "TEACHERS' DAY 2K23",
],
];
function getImagesFromFolder($folder, $allowedExtensions = ['webp', 'jpg', 'jpeg', 'png'])
{
$directory = public_path("{$folder}/");
return collect(File::files($directory))->filter(function ($file) use ($allowedExtensions) {
return in_array(strtolower($file->getExtension()), $allowedExtensions);
});
}
@endphp
@foreach ($imageSets as $imageSet)
— {{ $imageSet['title'] }}
@foreach (getImagesFromFolder("{$baseImagePath}{$imageSet['folder']}") as $file)
@php $imageUrl = asset("{$baseImagePath}{$imageSet['folder']}/" . $file->getFilename()); @endphp
@endforeach
@endforeach
@endsection