persist() публичный Метод

Save the model to the database.
public persist ( object $model ) : void
$model object The model instance.
Результат void
Пример #1
0
 /**
  * Creates and saves a model.
  *
  * @param string $name The model definition name.
  * @param array  $attr The model attributes.
  *
  * @return object
  */
 public function create($name, array $attr = [])
 {
     $model = $this->make($name, $attr, true);
     $this->store->persist($model);
     if ($this->triggerCallback($model, $name)) {
         $this->store->persist($model);
     }
     return $model;
 }