/**
  * Update an edge's properties.
  *
  * @param  int $id
  * @param  array  $properties
  * @return boolean
  */
 public function updateEdge($id, array $properties)
 {
     $edge = $this->finder->first($this->parent, $this->related->findOrFail($id), $this->type);
     $edge->fill($properties);
     return $edge->save();
 }
Example #2
0
 /**
  * Get the direct relationship between
  * the currently set models ($parent and $related).
  *
  * @return \Sgpatil\Orientdb\Eloquent\Edge[In|Out]
  */
 public function current()
 {
     $relation = $this->finder->firstRelation($this->parent, $this->related, $this->type, $this->direction);
     return !is_null($relation) ? $this->newFromRelation($relation) : null;
 }