mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Fixes for purge company and preserve settings
This commit is contained in:
parent
69264b34f3
commit
dffb9be189
@ -143,9 +143,10 @@ class MigrationController extends BaseController
|
||||
* ),
|
||||
* )
|
||||
*/
|
||||
public function purgeCompanySaveSettings(Company $company)
|
||||
public function purgeCompanySaveSettings(Request $request, Company $company)
|
||||
{
|
||||
$company->client->delete();
|
||||
|
||||
$company->clients()->delete();
|
||||
$company->save();
|
||||
|
||||
return response()->json(['message' => 'Settings preserved'], 200);
|
||||
|
@ -411,8 +411,7 @@ class Company extends BaseModel
|
||||
|
||||
public function resolveRouteBinding($value)
|
||||
{
|
||||
return $this
|
||||
->where('id', $this->decodePrimaryKey($value))->firstOrFail();
|
||||
return $this->where('id', $this->decodePrimaryKey($value))->firstOrFail();
|
||||
}
|
||||
|
||||
public function domain()
|
||||
@ -445,4 +444,5 @@ class Company extends BaseModel
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user