misc_pterodactyl-panel/app/Http/Requests/Api/Application/Nests/Eggs/GetEggRequest.php

30 lines
649 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Http\Requests\Api\Application\Nests\Eggs;
use Pterodactyl\Services\Acl\Api\AdminAcl;
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
class GetEggRequest extends ApplicationApiRequest
{
/**
* @var string
*/
protected $resource = AdminAcl::RESOURCE_EGGS;
/**
* @var int
*/
protected $permission = AdminAcl::READ;
/**
* Determine if the requested egg exists for the selected nest.
*
* @return bool
*/
public function resourceExists(): bool
{
return $this->getModel('nest')->id === $this->getModel('egg')->nest_id;
}
}