try{ $did = DB::insert('vmi_sales_orders',array_keys($value))->values($value)->execute('newerp'); }catch(Database_Exception $e){ return $e->getMessage(); }