protected function replaceRouteKeyName(&$stub, $route_key_name){

        if($route_key_name=='id')
            $replace = "";
        else{
            $replace = "public function getRouteKeyName(){ return \"{$route_key_name}\"; }";
        }

        $stub = str_replace('DummyRouteKeyName', $replace, $stub);

        return $this;
    }
protected function replaceRouteKeyName(&$stub, $route_key_name){

        if($route_key_name=='id')
            $replace = "";
        else{
            $replace = "public function getRouteKeyName(){ return \"{$route_key_name}\"; }";
        }

        $stub = str_replace('DummyRouteKeyName', $replace, $stub);

        return $this;
    }
protected function replaceRouteKeyName ( & $ stub , $ route_key_name ) { if ( $ route_key_name == 'id' ) $ replace = "" ; else { $ replace = "public function getRouteKeyName(){ return \"{$route_key_name}\"; }" ; } $ stub = str_replace ( 'DummyRouteKeyName' , $ replace , $ stub ) ; return $ this ; }
Replace RouteKeyName dummy.

@param string $stub
@param array  $fields

@return $this
Replace RouteKeyName dummy .