src/http/controllers/HCBaseController.php
public function apiMerge()
    {
        DB::beginTransaction();

        try {
            $record = $this->__apiMerge();
        } catch (\Exception $e) {
            DB::rollback();

            return HCLog::error('CORE-0007' . $e->getCode(), $e->getMessage());
        }

        DB::commit();

        return $record;
    }
public function apiMerge()
    {
        DB::beginTransaction();

        try {
            $record = $this->__apiMerge();
        } catch (\Exception $e) {
            DB::rollback();

            return HCLog::error('CORE-0007' . $e->getCode(), $e->getMessage());
        }

        DB::commit();

        return $record;
    }
public function apiMerge ( ) { DB :: beginTransaction ( ) ; try { $ record = $ this -> __apiMerge ( ) ; } catch ( \ Exception $ e ) { DB :: rollback ( ) ; return HCLog :: error ( 'CORE-0007' . $ e -> getCode ( ) , $ e -> getMessage ( ) ) ; } DB :: commit ( ) ; return $ record ; }
Function will can be used to merge multiple records into one

@return mixed
Function will can be used to merge multiple records into one