mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-23 06:14:12 +00:00
fix/removeDeleteandAddBankStatus
This commit is contained in:
@@ -37,4 +37,10 @@ class SettingMalaysiaBankController extends Controller
|
||||
|
||||
return response()->json(null, 204);
|
||||
}
|
||||
|
||||
public function updateStatus(string $id, SettingMalaysiaBank $malaysiaBank){
|
||||
$currentRecord = SettingMalaysiaBank::where('id', $id)->first();
|
||||
SettingMalaysiaBank::where('id', $id)->update(['active' => $currentRecord->active === 1 ? 0 : 1]);
|
||||
return response()->json(SettingMalaysiaBank::all(), 200);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user