Encore\Admin\Admin::getModel PHP Méthode

getModel() public méthode

public getModel ( $model ) : mixed
$model
Résultat 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");
    }