src/Console/Commands/MakeRepositoryCommand.php
protected function getModelClass($name)
    {
        $modelClass = $this->getModelNameInput();

        // Generate the model class from the repository class name if not explicitly set
        if ( ! $modelClass) {

            $repositoryClass = str_replace($this->getNamespace($name) . '\\', '', $name);
            $class           = str_replace($this->suffix, '', $repositoryClass);

            $modelClass = str_singular($class);
        }

        // Append the expected models namespace if not namespaced yet
        if (false === strpos($modelClass, '\\')) {
            $modelClass = "{$this->models}\\{$modelClass}";
        }

        return $modelClass;
    }
protected function getModelClass($name)
    {
        $modelClass = $this->getModelNameInput();

        // Generate the model class from the repository class name if not explicitly set
        if ( ! $modelClass) {

            $repositoryClass = str_replace($this->getNamespace($name) . '\\', '', $name);
            $class           = str_replace($this->suffix, '', $repositoryClass);

            $modelClass = str_singular($class);
        }

        // Append the expected models namespace if not namespaced yet
        if (false === strpos($modelClass, '\\')) {
            $modelClass = "{$this->models}\\{$modelClass}";
        }

        return $modelClass;
    }
protected function getModelClass ( $ name ) { $ modelClass = $ this -> getModelNameInput ( ) ; // Generate the model class from the repository class name if not explicitly set if ( ! $ modelClass ) { $ repositoryClass = str_replace ( $ this -> getNamespace ( $ name ) . '\\' , '' , $ name ) ; $ class = str_replace ( $ this -> suffix , '' , $ repositoryClass ) ; $ modelClass = str_singular ( $ class ) ; } // Append the expected models namespace if not namespaced yet if ( false === strpos ( $ modelClass , '\\' ) ) { $ modelClass = "{$this->models}\\{$modelClass}" ; } return $ modelClass ; }
Get the class name of the probable associated model.

@param $name
@return string
Get the class name of the probable associated model .