Files

22 lines
517 B
PHP
Raw Permalink Normal View History

<?php
2018-01-19 19:58:57 -06:00
namespace Pterodactyl\Http\Requests\Api\Application\Locations;
use Pterodactyl\Models\Location;
class UpdateLocationRequest extends StoreLocationRequest
{
/**
2018-05-13 10:50:56 -04:00
* Rules to validate this request against.
*/
public function rules(): array
{
$locationId = $this->route()->parameter('location')->id; // @phpstan-ignore property.nonObject
return collect(Location::getRulesForUpdate($locationId))->only([
'short',
'long',
2019-03-02 16:27:36 -05:00
])->toArray();
}
}