added db transaction to jobs
This commit is contained in:
@ -32,17 +32,19 @@ class UpdateTransaction extends Job
|
||||
{
|
||||
$this->authorize();
|
||||
|
||||
$this->transaction->update($this->request->all());
|
||||
\DB::transaction(function () {
|
||||
$this->transaction->update($this->request->all());
|
||||
|
||||
// Upload attachment
|
||||
if ($this->request->file('attachment')) {
|
||||
$media = $this->getMedia($this->request->file('attachment'), 'transactions');
|
||||
// Upload attachment
|
||||
if ($this->request->file('attachment')) {
|
||||
$media = $this->getMedia($this->request->file('attachment'), 'transactions');
|
||||
|
||||
$this->transaction->attachMedia($media, 'attachment');
|
||||
}
|
||||
$this->transaction->attachMedia($media, 'attachment');
|
||||
}
|
||||
|
||||
// Recurring
|
||||
$this->transaction->updateRecurring();
|
||||
// Recurring
|
||||
$this->transaction->updateRecurring();
|
||||
});
|
||||
|
||||
return $this->transaction;
|
||||
}
|
||||
|
Reference in New Issue
Block a user