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

30 lines
728 B
PHP
Raw Normal View History

<?php
2018-11-20 05:03:03 +00:00
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
{
2021-01-24 01:17:35 +00:00
protected string $resource = AdminAcl::RESOURCE_LOCATIONS;
protected int $permission = AdminAcl::WRITE;
public function rules(): array
{
return collect(Location::getRules())->only([
'long',
'short',
])->toArray();
}
2021-01-24 01:17:35 +00:00
public function attributes(): array
{
return [
'long' => 'Location Description',
'short' => 'Location Identifier',
];
}
}