diff --git a/app/Http/Controllers/TransaksiKeuntunganController.php b/app/Http/Controllers/TransaksiKeuntunganController.php new file mode 100644 index 0000000..7886d98 --- /dev/null +++ b/app/Http/Controllers/TransaksiKeuntunganController.php @@ -0,0 +1,27 @@ +where('norujukan','=',$norujukan)->get(); + + return response()->json($transaksi); + } + + public function createTransaksiKeuntungan(Request $request){ + $transaksi = TransaksiKeuntungan::on('mysql7')->create([ + 'norujukan' => $request->norujukan, + 'bayaran_keuntungan' => $request->bayaran_keuntungan, + 'tarikh_bayaran'=> $request->tarikh_bayaran, + 'tempoh'=> $request->tempoh, + 'kodcaw'=> $request->kodcaw + ]); + + return response()->json($transaksi,201); + } +} diff --git a/app/TransaksiKeuntungan.php b/app/TransaksiKeuntungan.php new file mode 100644 index 0000000..6b55b4e --- /dev/null +++ b/app/TransaksiKeuntungan.php @@ -0,0 +1,26 @@ +