LMongo\Eloquent\Model::insertAndSetId PHP 메소드

insertAndSetId() 보호된 메소드

Insert the given attributes and set the ID on the model.
protected insertAndSetId ( Builder $query, array $attributes ) : void
$query Builder
$attributes array
리턴 void
    protected function insertAndSetId($query, $attributes)
    {
        $keyName = $this->getKeyName();
        $this->setAttribute($keyName, $query->save($attributes));
    }
Model