30 lines
670 B
PHP
30 lines
670 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Eggs;
|
|
|
|
use Pterodactyl\Models\Egg;
|
|
use Pterodactyl\Services\Acl\Api\AdminAcl;
|
|
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
|
|
|
class DeleteEggRequest extends ApplicationApiRequest
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $resource = AdminAcl::RESOURCE_EGGS;
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
protected $permission = AdminAcl::WRITE;
|
|
|
|
/**
|
|
* Determine if the requested egg exists for the selected nest.
|
|
*/
|
|
public function resourceExists(): bool
|
|
{
|
|
$egg = $this->route()->parameter('egg');
|
|
|
|
return $egg instanceof Egg && $egg->exists;
|
|
}
|
|
}
|