2020-12-28 19:47:08 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Roles;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\AdminRole;
|
|
|
|
|
2021-01-08 22:09:02 +00:00
|
|
|
class GetRoleRequest extends GetRolesRequest
|
2020-12-28 19:47:08 +00:00
|
|
|
{
|
|
|
|
public function resourceExists(): bool
|
|
|
|
{
|
|
|
|
$role = $this->route()->parameter('role');
|
|
|
|
|
|
|
|
return $role instanceof AdminRole && $role->exists;
|
|
|
|
}
|
|
|
|
}
|