/** * Translate an attribute id under specified group. * * @param string $group * @param string $default * * @return string */ protected function translate($group = null, $default = null) { $key = $this->id; if ($group !== null) { $key = "{$group}.{$key}"; } return $this->entity->translate($key, $default); }