peer->created_uuid = $data['created_uuid']; $this->peer->updated_uuid = $data['updated_uuid']; $this->peer->torrent_uuid = $data['torrent_uuid']; $this->peer->peer_id = $data['peer_id']; $this->peer->ip = $data['ip']; $this->peer->port = $data['port']; $this->peer->status = $data['status']; $this->peer->natuser = $data['natuser']; $this->peer->client = $data['client']; $this->peer->dns = $data['dns']; $this->peer->uploaded = $data['uploaded']; $this->peer->downloaded = $data['downloaded']; if($this->peer->save()) { return $this->peer; } return false; } }