@extends('frontend::layouts.app') @section('title', 'Activity events - Activities - WBU - World Buddhist University') @php $activities = [ [ 'id' => '1', 'title' => 'The 12th Meeting of the World Buddhist University Council', 'date' => '19th - 20th October 2022', 'tag' => 'Activity events', 'tag_id' => 'events', 'image' => '/images/activity/1.jpg', ], [ 'id' => '2', 'title' => 'The 11th Meeting of the World Buddhist University Council', 'date' => '6th November 2018', 'tag' => 'Activity events', 'tag_id' => 'events', 'image' => '/images/activity/2.jpg', ], [ 'id' => '4', 'title' => 'The International Conference on Animal Rights, Values and Preservation : Buddhist Ethicd and Altru8stic Practices. Department of Philosophy,Hokkaido Un8versity,Sapporo, Japan ', 'date' => '26-Sun.29 March 2015', 'tag' => 'Activity events', 'tag_id' => 'events', 'image' => '/images/activity/4.jpg', ], [ 'id' => '11', 'title' => 'WBU HELD TRAINING COURSE ON THERAVADA BUDDHIST MEDITATION', 'date' => 'April 1, 2026', 'tag' => 'Activity events', 'tag_id' => 'events', 'image' => '/images/activity/11.jpg', ], [ 'id' => '16', 'title' => 'Vesak Day Cultural Celebration', 'date' => 'May 15, 2026', 'tag' => 'Activity events', 'tag_id' => 'events', 'image' => '/images/event-vesak.jpg', ], [ 'id' => '18', 'title' => 'Compassion in Action: Community Service Program', 'date' => 'June 1, 2026', 'tag' => 'Activity events', 'tag_id' => 'events', 'image' => '/images/activity-peace.jpg', ], [ 'id' => '20', 'title' => 'International Buddhist Film Festival', 'date' => 'June 20, 2026', 'tag' => 'Activity events', 'tag_id' => 'events', 'image' => '/images/activity-festival.jpg', ], ]; $itemsPerPage = 12; $currentPage = (int) request()->query('page', 1); $totalPages = max(1, (int) ceil(count($activities) / $itemsPerPage)); $currentPage = max(1, min($currentPage, $totalPages)); $startIndex = ($currentPage - 1) * $itemsPerPage; $paginatedActivities = array_slice($activities, $startIndex, $itemsPerPage); @endphp @section('content') Activity events Home Activities Activity events @forelse($paginatedActivities as $activity) @include('frontend::components.activity-card', [ 'id' => $activity['id'], 'title' => $activity['title'], 'date' => $activity['date'], 'tag' => $activity['tag'], 'image' => $activity['image'], ]) @empty No activity events found. @endforelse @if($totalPages > 1) @php $prevUrl = url('/activities/activity-events') . '?' . http_build_query([ 'page' => max(1, $currentPage - 1), ]); $nextUrl = url('/activities/activity-events') . '?' . http_build_query([ 'page' => min($totalPages, $currentPage + 1), ]); @endphp Previous @for($page = 1; $page <= $totalPages; $page++) @php $pageUrl = url('/activities/activity-events') . '?' . http_build_query([ 'page' => $page, ]); @endphp {{ $page }} @endfor Next @endif @endsection
No activity events found.