Update customer/user relationships

This commit is contained in:
Burak Çakırel 2021-04-29 11:43:52 +03:00
parent 567496e564
commit beaa84e380
No known key found for this signature in database
GPG Key ID: 48FFBB7771B99C7C
2 changed files with 7 additions and 1 deletions

View File

@ -55,6 +55,10 @@ class UpdateUser extends Job
if ($this->request->has('companies')) {
$this->user->companies()->sync($this->request->get('companies'));
}
if ($this->user->contact) {
$this->user->contact->update($this->request->input());
}
});
return $this->user;

View File

@ -38,6 +38,8 @@ class UpdateContact extends Job
\DB::transaction(function () {
if ($this->request->get('create_user', 'false') === 'true') {
$this->createUser();
} elseif ($this->contact->user) {
$this->contact->user->update($this->request->all());
}
// Upload logo