cbcf62086f
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
28 lines
635 B
PHP
28 lines
635 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Http\Requests\Admin;
|
|
|
|
use Pterodactyl\Models\User;
|
|
use Illuminate\Support\Collection;
|
|
|
|
class UserFormRequest extends AdminFormRequest
|
|
{
|
|
/**
|
|
* Rules to apply to requests for updating or creating a user
|
|
* in the Admin CP.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return Collection::make(
|
|
User::getRulesForUpdate($this->route()->parameter('user'))
|
|
)->only([
|
|
'email',
|
|
'username',
|
|
'name_first',
|
|
'name_last',
|
|
'password',
|
|
'language',
|
|
'root_admin',
|
|
])->toArray();
|
|
}
|
|
}
|