public function resourceId($id) : self
    {
        $this->id = ($id instanceof \Illuminate\Database\Eloquent\Model) ? $id->getKey() : $id;

        return $this;
    }
public function resourceId($id) : self
    {
        $this->id = ($id instanceof \Illuminate\Database\Eloquent\Model) ? $id->getKey() : $id;

        return $this;
    }
public function resourceId ( $ id ) : self { $ this -> id = ( $ id instanceof \ Illuminate \ Database \ Eloquent \ Model ) ? $ id -> getKey ( ) : $ id ; return $ this ; }
sets resource id

@param int|string|Model $id
@return UrlGenerator
sets resource id