misc_pterodactyl-panel/app/Http/Requests/Api/Application/Users/StoreUserRequest.php

33 lines
771 B
PHP

<?php
namespace Pterodactyl\Http\Requests\Api\Application\Users;
use Pterodactyl\Models\User;
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
class StoreUserRequest extends ApplicationApiRequest
{
public function rules(array $rules = null): array
{
$rules = $rules ?? User::getRules();
$response = collect($rules)->only([
'external_id',
'email',
'username',
'password',
'language',
'admin_role_id',
])->toArray();
return $response;
}
public function attributes(): array
{
return [
'external_id' => 'Third Party Identifier',
'root_admin' => 'Root Administrator Status',
];
}
}