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

19 lines
411 B
PHP
Raw Permalink Normal View History

<?php
2018-01-20 01:58:57 +00:00
namespace Pterodactyl\Http\Requests\Api\Application\Users;
use Pterodactyl\Models\User;
class UpdateUserRequest extends StoreUserRequest
{
/**
* Return the validation rules for this request.
*/
2018-02-04 21:38:38 +00:00
public function rules(array $rules = null): array
{
$userId = $this->parameter('user', User::class)->id;
return parent::rules(User::getRulesForUpdate($userId));
}
}