public static function getDefaultRole() { $defaultRoleId = Option::getValueByKey('default_role_id'); $defaultRole = Role::whereId($defaultRoleId)->first(); if (!$defaultRole) { throw new SystemException(SystemException::DefaultRoleNotDefined); } return $defaultRole; }