⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.229
Server IP:
95.217.99.93
Server:
Linux sv1.sonichosted.com 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
lifestylescentra
/
public_html
/
app
/
Services
/
View File Name :
EventService.php
<?php namespace App\Services; use App\Models\Event; use Illuminate\Database\Eloquent\Collection; class EventService { public function getEvents($limit = 10): Collection { return Event::limit($limit)->get(); } public function getEvent($id): ?Event { return Event::find($id); } public function getEventBySlug($slug): ?Event { return Event::where('slug', $slug)->first(); } public function getFeaturedEvents($limit = 10): Collection { return Event::where('is_featured', 1)->limit($limit)->get(); } public function getUpcomingEvents($limit = 10): Collection { return Event::where('is_upcoming', 1)->limit($limit)->get(); } public function getPastEvents($limit = 10): Collection { return Event::where('is_past', 1)->limit($limit)->get(); } public function getRelatedEvents($event_id, $limit = 10): Collection { return Event::where('id', '!=', $event_id)->limit($limit)->get(); } }