public function apiStore()
    {
        DB::beginTransaction();

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

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

        DB::commit();

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

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

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

        DB::commit();

        return response($record);
    }
public function apiStore ( ) { DB :: beginTransaction ( ) ; try { $ record = $ this -> __apiStore ( ) ; } catch ( \ Exception $ e ) { DB :: rollback ( ) ; return HCLog :: error ( 'CORE-0002' . $ e -> getCode ( ) , $ e -> getMessage ( ) ) ; } DB :: commit ( ) ; return response ( $ record ) ; }
Function which will store new record

@return mixed
Function which will store new record