app/Console/Commands/ControllerMakeCommand.php
protected function buildView($name, $method = null)
    {
        $replace = [];

        if ($this->option('parent')) {
            $replace = $this->buildParentReplacements();
        }

        if ($this->option('model')) {
            $replace = $this->buildModelReplacements($replace);
        }

        if ($this->option('parent')) {
            $replace['parent_dummy_view'] = $this->getParentViewName($name);
            $replace['parent_dummy_route'] = $this->getParentRouteName($name);
        }
        $replace['dummy_view'] = $this->getViewName($name);
        $replace['dummy_route'] = $this->getRouteName($name);

        return str_replace(array_keys($replace), array_values($replace), $this->files->get($this->getViewStub($method, $name)));
    }
protected function buildView($name, $method = null)
    {
        $replace = [];

        if ($this->option('parent')) {
            $replace = $this->buildParentReplacements();
        }

        if ($this->option('model')) {
            $replace = $this->buildModelReplacements($replace);
        }

        if ($this->option('parent')) {
            $replace['parent_dummy_view'] = $this->getParentViewName($name);
            $replace['parent_dummy_route'] = $this->getParentRouteName($name);
        }
        $replace['dummy_view'] = $this->getViewName($name);
        $replace['dummy_route'] = $this->getRouteName($name);

        return str_replace(array_keys($replace), array_values($replace), $this->files->get($this->getViewStub($method, $name)));
    }
protected function buildView ( $ name , $ method = null ) { $ replace = [ ] ; if ( $ this -> option ( 'parent' ) ) { $ replace = $ this -> buildParentReplacements ( ) ; } if ( $ this -> option ( 'model' ) ) { $ replace = $ this -> buildModelReplacements ( $ replace ) ; } if ( $ this -> option ( 'parent' ) ) { $ replace [ 'parent_dummy_view' ] = $ this -> getParentViewName ( $ name ) ; $ replace [ 'parent_dummy_route' ] = $ this -> getParentRouteName ( $ name ) ; } $ replace [ 'dummy_view' ] = $ this -> getViewName ( $ name ) ; $ replace [ 'dummy_route' ] = $ this -> getRouteName ( $ name ) ; return str_replace ( array_keys ( $ replace ) , array_values ( $ replace ) , $ this -> files -> get ( $ this -> getViewStub ( $ method , $ name ) ) ) ; }
Build the view with the given name.

@param  string $name
@param  string|null $method
@return string
@throws \Illuminate\Contracts\Filesystem\FileNotFoundException
Build the view with the given name .