Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Http/Requests/Api/Application/Locations/UpdateLocationRequest.php
10277 views
1
<?php
2
3
namespace Pterodactyl\Http\Requests\Api\Application\Locations;
4
5
use Pterodactyl\Models\Location;
6
7
class UpdateLocationRequest extends StoreLocationRequest
8
{
9
/**
10
* Rules to validate this request against.
11
*/
12
public function rules(): array
13
{
14
$locationId = $this->route()->parameter('location')->id; // @phpstan-ignore property.nonObject
15
16
return collect(Location::getRulesForUpdate($locationId))->only([
17
'short',
18
'long',
19
])->toArray();
20
}
21
}
22
23