Example #1
0
 /**
  * Insert the given attributes and set the ID on the model.
  *
  * @param  \Nova\Database\ORM\Builder  $query
  * @param  array  $attributes
  * @return void
  */
 protected function insertAndSetId(Builder $query, $attributes)
 {
     $id = $query->insertGetId($attributes, $keyName = $this->getKeyName());
     $this->setAttribute($keyName, $id);
 }