addSelect('table_name') ->addWhere('name', '=', $customGroupName) ->execute() ->first()['table_name']; } /** * Given a sql table name, return the name of the api entity. * * @param $tableName * @return string */ public static function getApiNameFromTableName($tableName) { return AllCoreTables::getBriefName(AllCoreTables::getClassForTable($tableName)); } }