added db transaction to jobs

This commit is contained in:
Denis Duliçi
2020-06-26 13:40:19 +03:00
parent f20f5c9def
commit acdc9da2c8
57 changed files with 606 additions and 469 deletions

View File

@ -33,11 +33,13 @@ class UpdateContact extends Job
{
$this->authorize();
if ($this->request->get('create_user', 'false') === 'true') {
$this->createUser();
}
\DB::transaction(function () {
if ($this->request->get('create_user', 'false') === 'true') {
$this->createUser();
}
$this->contact->update($this->request->all());
$this->contact->update($this->request->all());
});
return $this->contact;
}