PteroTheme/app/Services/Locations/LocationUpdateService.php

20 lines
384 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Services\Locations;
use Pterodactyl\Models\Location;
class LocationUpdateService
{
/**
* Update an existing location.
*
*/
public function handle(Location|int $location, array $data): Location
{
$location = ($location instanceof Location) ? $location->id : $location;
2022-10-23 09:25:49 +01:00
return $location->update($data);
}
}