src/Actions/ManagesSites.php
public function createSite($serverId, array $data, $wait = true)
    {
        $site = $this->post("servers/$serverId/sites", $data)['site'];

        if ($wait) {
            return $this->retry($this->getTimeout(), function () use ($serverId, $site) {
                $site = $this->site($serverId, $site['id']);

                return $site->status == 'installed' ? $site : null;
            });
        }

        return new Site($site + ['server_id' => $serverId], $this);
    }
public function createSite($serverId, array $data, $wait = true)
    {
        $site = $this->post("servers/$serverId/sites", $data)['site'];

        if ($wait) {
            return $this->retry($this->getTimeout(), function () use ($serverId, $site) {
                $site = $this->site($serverId, $site['id']);

                return $site->status == 'installed' ? $site : null;
            });
        }

        return new Site($site + ['server_id' => $serverId], $this);
    }
public function createSite ( $ serverId , array $ data , $ wait = true ) { $ site = $ this -> post ( "servers/$serverId/sites" , $ data ) [ 'site' ] ; if ( $ wait ) { return $ this -> retry ( $ this -> getTimeout ( ) , function ( ) use ( $ serverId , $ site ) { $ site = $ this -> site ( $ serverId , $ site [ 'id' ] ) ; return $ site -> status == 'installed' ? $ site : null ; } ) ; } return new Site ( $ site + [ 'server_id' => $ serverId ] , $ this ) ; }
Create a new site.

@param  integer $serverId
@param  array $data
@param  boolean $wait
@return Site
Create a new site .