protected function parseAttributes($data) { if (property_exists($data, 'email')) { $data->id = $data->email; } return $data; }