League\FactoryMuffin\Stores\ModelStore::save PHP Method

save() protected method

Save our object to the db, and keep track of it.
protected save ( object $model ) : mixed
$model object The model instance.
return mixed
    protected function save($model)
    {
        $method = $this->methods['save'];
        if (!method_exists($model, $method) || !is_callable([$model, $method])) {
            throw new SaveMethodNotFoundException(get_class($model), $method);
        }
        return $model->{$method}();
    }