2018-01-13 02:39:15 +00:00
|
|
|
<?php
|
|
|
|
|
2018-01-20 01:58:57 +00:00
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Users;
|
2018-01-13 02:39:15 +00:00
|
|
|
|
|
|
|
use Pterodactyl\Models\User;
|
2018-01-20 03:47:06 +00:00
|
|
|
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
2018-01-13 02:39:15 +00:00
|
|
|
|
2018-01-20 03:47:06 +00:00
|
|
|
class StoreUserRequest extends ApplicationApiRequest
|
2018-01-13 02:39:15 +00:00
|
|
|
{
|
2018-02-04 21:38:38 +00:00
|
|
|
public function rules(array $rules = null): array
|
2018-01-13 02:39:15 +00:00
|
|
|
{
|
2019-09-05 05:26:28 +00:00
|
|
|
$rules = $rules ?? User::getRules();
|
2018-02-04 21:38:38 +00:00
|
|
|
|
2021-09-13 23:24:16 +00:00
|
|
|
return collect($rules)->only([
|
2018-01-13 02:39:15 +00:00
|
|
|
'external_id',
|
|
|
|
'email',
|
|
|
|
'username',
|
|
|
|
'password',
|
2021-07-25 21:59:58 +00:00
|
|
|
'admin_role_id',
|
2021-09-13 23:24:16 +00:00
|
|
|
'root_admin',
|
2018-01-13 02:39:15 +00:00
|
|
|
])->toArray();
|
|
|
|
}
|
|
|
|
}
|