32 lines
698 B
PHP
32 lines
698 B
PHP
<?php
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Nests;
|
|
|
|
use Pterodactyl\Models\Nest;
|
|
use Pterodactyl\Services\Acl\Api\AdminAcl;
|
|
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
|
|
|
class DeleteNestRequest extends ApplicationApiRequest
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $resource = AdminAcl::RESOURCE_NESTS;
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
protected $permission = AdminAcl::WRITE;
|
|
|
|
/**
|
|
* Determine if the requested nest exists on the Panel.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function resourceExists(): bool
|
|
{
|
|
$nest = $this->route()->parameter('nest');
|
|
|
|
return $nest instanceof Nest && $nest->exists;
|
|
}
|
|
}
|