added db transaction to jobs
This commit is contained in:
@ -35,11 +35,13 @@ class UpdateDashboard extends Job
|
||||
{
|
||||
$this->authorize();
|
||||
|
||||
$this->dashboard->update($this->request->all());
|
||||
\DB::transaction(function () {
|
||||
$this->dashboard->update($this->request->all());
|
||||
|
||||
if ($this->request->has('users')) {
|
||||
$this->dashboard->users()->sync($this->request->get('users'));
|
||||
}
|
||||
if ($this->request->has('users')) {
|
||||
$this->dashboard->users()->sync($this->request->get('users'));
|
||||
}
|
||||
});
|
||||
|
||||
return $this->dashboard;
|
||||
}
|
||||
|
Reference in New Issue
Block a user