public function prepareData(array $data) { $data = $this->replaceAttributes($data); // Remove trailing slashes from the location if (array_key_exists('loc', $data)) { $data['loc'] = trim($data['loc'], '/'); } return $data; }