mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for restoring models
This commit is contained in:
parent
19910d2867
commit
0c89f998eb
@ -55,7 +55,10 @@ class CompanyGatewayObserver
|
||||
public function restored(CompanyGateway $company_gateway)
|
||||
{
|
||||
//When we restore the gateway, bring back the tokens!
|
||||
ClientGatewayToken::where('company_gateway_id', $company_gateway->id)->withTrashed()->get()->restore();
|
||||
ClientGatewayToken::where('company_gateway_id', $company_gateway->id)
|
||||
->withTrashed()->cursor()->each(function ($cgt){
|
||||
$cgt->restore();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user