29 lines
728 B
PHP
29 lines
728 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Locations;
|
|
|
|
use Pterodactyl\Models\Location;
|
|
use Pterodactyl\Services\Acl\Api\AdminAcl;
|
|
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
|
|
|
class StoreLocationRequest extends ApplicationApiRequest
|
|
{
|
|
protected string $resource = AdminAcl::RESOURCE_LOCATIONS;
|
|
protected int $permission = AdminAcl::WRITE;
|
|
|
|
public function rules(): array
|
|
{
|
|
return collect(Location::getRules())->only([
|
|
'long',
|
|
'short',
|
|
])->toArray();
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
'long' => 'Location Description',
|
|
'short' => 'Location Identifier',
|
|
];
|
|
}
|
|
}
|