8afced3410
Cleanup middleware handling and parameters on controllers...
29 lines
649 B
PHP
29 lines
649 B
PHP
<?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;
|
|
}
|
|
}
|