public function accept()
 {
     $this->follower = User::find($this->relation->getStartNode()->getId());
     $this->follow = User::find($this->relation->getEndNode()->getId());
     $this->follow->friends()->attach($this->follower);
     $this->relation->delete();
 }
Beispiel #2
0
 public function load($id)
 {
     $this->model = User::find($id);
     return !empty($this->model);
 }