src/Commands/CrudControllerCommand.php
protected function replaceModelNamespaceSegments(&$stub, $modelNamespace)
    {
        $modelSegments = explode('\\', $modelNamespace);
        foreach ($modelSegments as $key => $segment) {
            $stub = str_replace('{{modelNamespace[' . $key . ']}}', $segment, $stub);
        }

        $stub = preg_replace('{{modelNamespace\[\d*\]}}', '', $stub);

        return $this;
    }
protected function replaceModelNamespaceSegments(&$stub, $modelNamespace)
    {
        $modelSegments = explode('\\', $modelNamespace);
        foreach ($modelSegments as $key => $segment) {
            $stub = str_replace('{{modelNamespace[' . $key . ']}}', $segment, $stub);
        }

        $stub = preg_replace('{{modelNamespace\[\d*\]}}', '', $stub);

        return $this;
    }
protected function replaceModelNamespaceSegments ( & $ stub , $ modelNamespace ) { $ modelSegments = explode ( '\\' , $ modelNamespace ) ; foreach ( $ modelSegments as $ key => $ segment ) { $ stub = str_replace ( '{{modelNamespace[' . $ key . ']}}' , $ segment , $ stub ) ; } $ stub = preg_replace ( '{{modelNamespace\[\d*\]}}' , '' , $ stub ) ; return $ this ; }
Replace the modelNamespace segments for the given stub

@param $stub
@param $modelNamespace

@return $this
Replace the modelNamespace segments for the given stub