public function apiUpdate(string $id)
    {
        DB::beginTransaction();

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

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

        DB::commit();

        return $record;
    }
public function apiUpdate(string $id)
    {
        DB::beginTransaction();

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

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

        DB::commit();

        return $record;
    }
public function apiUpdate ( string $ id ) { DB :: beginTransaction ( ) ; try { $ record = $ this -> __apiUpdate ( $ id ) ; } catch ( \ Exception $ e ) { DB :: rollback ( ) ; return HCLog :: error ( 'CORE-0003' . $ e -> getCode ( ) , $ e -> getMessage ( ) ) ; } DB :: commit ( ) ; return $ record ; }
Function which will update record

@param $id
@return mixed
Function which will update record