public function get($key, $seconds = 60)
    {
        $result = $this->connection()->setnx($key, 1);

        if ($result === 1) {
            $this->connection()->expire($key, $seconds);
        }

        return $result === 1;
    }
public function get($key, $seconds = 60)
    {
        $result = $this->connection()->setnx($key, 1);

        if ($result === 1) {
            $this->connection()->expire($key, $seconds);
        }

        return $result === 1;
    }
public function get ( $ key , $ seconds = 60 ) { $ result = $ this -> connection ( ) -> setnx ( $ key , 1 ) ; if ( $ result === 1 ) { $ this -> connection ( ) -> expire ( $ key , $ seconds ) ; } return $ result === 1 ; }
Attempt to get a lock for the given key.

@param  string  $key
@param  int  $seconds
@return bool
Attempt to get a lock for the given key .