public function createModel()
    {
        if (is_string($model = $this->getModel())) {
            if (! class_exists($class = '\\'.ltrim($model, '\\'))) {
                throw new RepositoryException("Class {$model} does NOT exist!");
            }

            $model = $this->getContainer()->make($class);
        }

        if (! $model instanceof Model) {
            throw new RepositoryException("Class {$model} must be an instance of \\Illuminate\\Database\\Eloquent\\Model");
        }

        return $model;
    }
public function createModel()
    {
        if (is_string($model = $this->getModel())) {
            if (! class_exists($class = '\\'.ltrim($model, '\\'))) {
                throw new RepositoryException("Class {$model} does NOT exist!");
            }

            $model = $this->getContainer()->make($class);
        }

        if (! $model instanceof Model) {
            throw new RepositoryException("Class {$model} must be an instance of \\Illuminate\\Database\\Eloquent\\Model");
        }

        return $model;
    }
public function createModel ( ) { if ( is_string ( $ model = $ this -> getModel ( ) ) ) { if ( ! class_exists ( $ class = '\\' . ltrim ( $ model , '\\' ) ) ) { throw new RepositoryException ( "Class {$model} does NOT exist!" ) ; } $ model = $ this -> getContainer ( ) -> make ( $ class ) ; } if ( ! $ model instanceof Model ) { throw new RepositoryException ( "Class {$model} must be an instance of \\Illuminate\\Database\\Eloquent\\Model" ) ; } return $ model ; }
Create a new repository model instance.

@throws \Rinvex\Repository\Exceptions\RepositoryException

@return \Illuminate\Database\Eloquent\Model
Create a new repository model instance .