From bce7ec8d3a7343099bb59459f0583119349d8359 Mon Sep 17 00:00:00 2001 From: Subash Date: Fri, 22 Aug 2025 11:17:01 +0545 Subject: [PATCH] error fix --- app/Http/Controllers/WebsiteController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/WebsiteController.php b/app/Http/Controllers/WebsiteController.php index 1b05c2d..6d84442 100644 --- a/app/Http/Controllers/WebsiteController.php +++ b/app/Http/Controllers/WebsiteController.php @@ -33,6 +33,8 @@ class WebsiteController extends Controller $countries = Country::where('status', 1)->where('parent_id', null)->get(); $interviews = Service::where('status', 1)->where('parent_id', null)->get(); $services = Service::where('status', 1)->where('parent_id', null)->get(); + $data['previousEvents'] = previousEvents(limit: null, order: 'asc'); + $data['upcomingEvents'] = upcomingEvents(limit: null, order: 'asc'); $this->path = config('app.client'); view()->share([ @@ -42,6 +44,8 @@ class WebsiteController extends Controller 'countries' => $countries, 'services' => $services, 'interviews' => $interviews, + 'previousEvents' => $data['previousEvents'], + 'upcomingEvents' => $data['upcomingEvents'], ]); } @@ -52,8 +56,6 @@ class WebsiteController extends Controller $data['successGalleries'] = getGalleriesByCategory(limit: 3, order: 'asc', category: 'voice-of-success'); $data['destinations'] = getDestinations(limit: null, order: 'asc'); $data['services'] = getServices(limit: null, order: 'asc'); - $data['previousEvents'] = previousEvents(limit: null, order: 'asc'); - $data['upcomingEvents'] = upcomingEvents(limit: null, order: 'asc'); $data['classes'] = getClasses(limit: null, order: 'asc'); $data['institutions'] = getInstitutions(limit: null, order: 'asc'); $data['faqs'] = getFAQs(limit: null, order: 'desc');