@extends('frontend.mainlayout')
@section('title', 'Events (CE Department)')
@section('banner')
Events (CE 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/Civil engineering/';
$imageSets = [
[
'title' => 'Rain water Harvesting',
'folder' => 'Rain water Harvesting',
'videos' => ['p74FDWjlF3Q'],
],
];
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 ($imageSet['videos'] as $video)
@endforeach
@foreach (getImagesFromFolder("{$baseImagePath}{$imageSet['folder']}") as $file)
@php $imageUrl = asset("{$baseImagePath}{$imageSet['folder']}/" . $file->getFilename()); @endphp
@endforeach
@endforeach
@endsection