public function build() : string
    {
        $path = collect([
                $this->prepends,
                $this->resourceKey,
                $this->id,
                $this->appends,
            ])
            ->filter()
            ->implode('/');

        $uri = "{$path}.{$this->format}";

        return $this->hasParams() ? $uri.'?'.http_build_query($this->params) : $uri;
    }
public function build() : string
    {
        $path = collect([
                $this->prepends,
                $this->resourceKey,
                $this->id,
                $this->appends,
            ])
            ->filter()
            ->implode('/');

        $uri = "{$path}.{$this->format}";

        return $this->hasParams() ? $uri.'?'.http_build_query($this->params) : $uri;
    }
public function build ( ) : string { $ path = collect ( [ $ this -> prepends , $ this -> resourceKey , $ this -> id , $ this -> appends , ] ) -> filter ( ) -> implode ( '/' ) ; $ uri = "{$path}.{$this->format}" ; return $ this -> hasParams ( ) ? $ uri . '?' . http_build_query ( $ this -> params ) : $ uri ; }
Build the path.

@return string
Build the path .