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;
    }