The resolve function resolves a given class or interface name to an instance using the service container:
$api resolve('HelpSpot\API');
    public function installSwooleServer()

    {

        if (! 
resolve(SwooleExtension::class)->isInstalled()) {

            
$this->error('The Swoole extension is missing.');



            return 
false;