/**
* Add a group in the db
*
* @param $name
* @throws InvalidArgumentException
* @return \Illuminate\Database\Eloquent\Model|static
*/
public function addGroup($name)
{
if ($this->isStringWithDots($name)) {
return $this->groupRepo->create($name);
}
$error = "The name must be a string with dots as namespaces";
throw new InvalidArgumentException($error);
}