Encore\Admin\Admin::getModel PHP Method

getModel() public method

public getModel ( $model ) : mixed
$model
return mixed
    public function getModel($model)
    {
        if ($model instanceof EloquentModel) {
            return $model;
        }
        if (is_string($model) && class_exists($model)) {
            return $this->getModel(new $model());
        }
        throw new InvalidArgumentException("{$model} is not a valid model");
    }