⚝
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 :
LocationService.php
<?php namespace App\Services; use App\Models\Location; class LocationService { /** * Get all locations * * @return \Illuminate\Database\Eloquent\Collection */ public function getAllLocations() { return Location::all(); } /** * Get location by id * * @param int $id * @return \App\Models\Location */ public function getLocationById(int $id) { return Location::find($id); } /** * Create location * * @param array<string, mixed> $data * @return \App\Models\Location */ public function createLocation(array $data) { return Location::create($data); } /** * Update location * * @param \App\Models\Location $location * @param array<string, mixed> $data * @return \App\Models\Location */ public function updateLocation(Location $location, array $data) { $location->update($data); return $location; } /** * Delete location * * @param \App\Models\Location $location * @return bool */ public function deleteLocation(Location $location) { return $location->delete(); } }