2018-01-13 02:39:15 +00:00
|
|
|
<?php
|
|
|
|
|
2018-01-20 01:58:57 +00:00
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Locations;
|
2018-01-13 02:39:15 +00:00
|
|
|
|
|
|
|
use Pterodactyl\Models\Location;
|
|
|
|
|
|
|
|
class UpdateLocationRequest extends StoreLocationRequest
|
|
|
|
{
|
|
|
|
public function rules(): array
|
|
|
|
{
|
2022-12-15 00:05:46 +00:00
|
|
|
$locationId = $this->route()->parameter('location')->id;
|
2018-01-13 02:39:15 +00:00
|
|
|
|
2019-09-05 05:26:28 +00:00
|
|
|
return collect(Location::getRulesForUpdate($locationId))->only([
|
2018-01-13 02:39:15 +00:00
|
|
|
'short',
|
|
|
|
'long',
|
2019-03-02 21:27:36 +00:00
|
|
|
])->toArray();
|
2018-01-13 02:39:15 +00:00
|
|
|
}
|
|
|
|
}
|