misc_pterodactyl-panel/app/Http/Requests/Server/Subuser/SubuserStoreFormRequest.php

32 lines
643 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Http\Requests\Server\Subuser;
use Pterodactyl\Http\Requests\Server\ServerFormRequest;
class SubuserStoreFormRequest extends ServerFormRequest
{
/**
2018-05-13 14:50:56 +00:00
* Return the user permission to validate this request against.
*
* @return string
*/
protected function permission(): string
{
return 'create-subuser';
}
/**
2018-05-13 14:50:56 +00:00
* The rules to validate this request submission against.
*
* @return array
*/
public function rules()
{
return [
'email' => 'required|email',
'permissions' => 'sometimes|array',
];
}
}