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(); }
public function load($id) { $this->model = User::find($id); return !empty($this->model); }