mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,5 +6,5 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SettingMalaysiaBank extends Model
|
||||
{
|
||||
protected $fillable = ['company_name','bank_name','acc_no','bank_address','swift','cnap','bank_branch'];
|
||||
protected $fillable = ['company_name','bank_name','acc_no','bank_address','swift','cnap','bank_branch', 'active'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user