protected function getDefaultAttributes($group)
{
if (!$group instanceof Group) {
throw new InvalidArgumentException(get_class($this) . ' can only serialize instances of ' . Group::class);
}
return ['nameSingular' => $this->translateGroupName($group->name_singular), 'namePlural' => $this->translateGroupName($group->name_plural), 'color' => $group->color, 'icon' => $group->icon];
}