League\FactoryMuffin\Stores\AbstractStore::persist PHP 메소드

persist() 공개 메소드

Save the model to the database.
public persist ( object $model ) : void
$model object The model instance.
리턴 void
    public function persist($model)
    {
        if (!$this->save($model)) {
            if (isset($model->validationErrors) && $model->validationErrors) {
                throw new SaveFailedException(get_class($model), $model->validationErrors);
            }
            throw new SaveFailedException(get_class($model));
        }
        if (!$this->isSaved($model)) {
            $this->markSaved($model);
        }
    }