protected function replaceViewNames(&$stub, $viewDirectory, $routesPrefix, array $views = null)
    {
        foreach (($views ?: $this->views) as $view) {
            $viewName = $this->getDotNotationName($viewDirectory, $routesPrefix, $view);
            $viewTemplate = $this->getViewTemplateName($view);
            $stub = $this->strReplace($viewTemplate, $viewName, $stub);
        }

        return $this;
    }
protected function replaceViewNames(&$stub, $viewDirectory, $routesPrefix, array $views = null)
    {
        foreach (($views ?: $this->views) as $view) {
            $viewName = $this->getDotNotationName($viewDirectory, $routesPrefix, $view);
            $viewTemplate = $this->getViewTemplateName($view);
            $stub = $this->strReplace($viewTemplate, $viewName, $stub);
        }

        return $this;
    }
protected function replaceViewNames ( & $ stub , $ viewDirectory , $ routesPrefix , array $ views = null ) { foreach ( ( $ views ? : $ this -> views ) as $ view ) { $ viewName = $ this -> getDotNotationName ( $ viewDirectory , $ routesPrefix , $ view ) ; $ viewTemplate = $ this -> getViewTemplateName ( $ view ) ; $ stub = $ this -> strReplace ( $ viewTemplate , $ viewName , $ stub ) ; } return $ this ; }
It Replaces the view names in a given stub

@param string $stub
@param string $viewDirectory
@param string $routesPrefix
@param array $views

@return $this
It Replaces the view names in a given stub