private function getLinkNameByCurrentDir()
    {
        $count = count($links = $this->links()->where('path', getcwd()));

        if ($count == 1) {
            return $links->shift()['site'];
        }

        if ($count > 1) {
            throw new DomainException("There are {$count} links related to the current directory, please specify the name: valet unlink <name>.");
        }
    }
private function getLinkNameByCurrentDir()
    {
        $count = count($links = $this->links()->where('path', getcwd()));

        if ($count == 1) {
            return $links->shift()['site'];
        }

        if ($count > 1) {
            throw new DomainException("There are {$count} links related to the current directory, please specify the name: valet unlink <name>.");
        }
    }
private function getLinkNameByCurrentDir ( ) { $ count = count ( $ links = $ this -> links ( ) -> where ( 'path' , getcwd ( ) ) ) ; if ( $ count == 1 ) { return $ links -> shift ( ) [ 'site' ] ; } if ( $ count > 1 ) { throw new DomainException ( "There are {$count} links related to the current directory, please specify the name: valet unlink <name>." ) ; } }
Get link name based on the current directory.

@return null|string
Get link name based on the current directory .