misc_pterodactyl-panel/app/Http/Requests/Api/Application/Locations/UpdateLocationRequest.php

23 lines
549 B
PHP

<?php
namespace Pterodactyl\Http\Requests\Api\Application\Locations;
use Pterodactyl\Models\Location;
class UpdateLocationRequest extends StoreLocationRequest
{
/**
* Rules to validate this request against.
*/
public function rules(): array
{
/** @var Location $location */
$location = $this->route()->parameter('location');
$locationId = $location->id;
return collect(Location::getRulesForUpdate($locationId))->only([
'short',
'long',
])->toArray();
}
}