protected function exists($url)
    {
        $shortener = Shortener::where('hash', hash('sha512', $url))->first();

        if (is_null($shortener)) {
            return false;
        }

        return route('shortener.show', [
            'url' => $this->hashids->encode($shortener->getKey()),
        ]);
    }
protected function exists($url)
    {
        $shortener = Shortener::where('hash', hash('sha512', $url))->first();

        if (is_null($shortener)) {
            return false;
        }

        return route('shortener.show', [
            'url' => $this->hashids->encode($shortener->getKey()),
        ]);
    }
protected function exists ( $ url ) { $ shortener = Shortener :: where ( 'hash' , hash ( 'sha512' , $ url ) ) -> first ( ) ; if ( is_null ( $ shortener ) ) { return false ; } return route ( 'shortener.show' , [ 'url' => $ this -> hashids -> encode ( $ shortener -> getKey ( ) ) , ] ) ; }
Returns shorten url if exists, or false.

@param $url

@return string
Returns shorten url if exists or false .