akaunting/app/Jobs/Common/UpdateWidget.php

20 lines
372 B
PHP
Raw Normal View History

<?php
namespace App\Jobs\Common;
use App\Abstracts\Job;
2021-09-06 11:53:57 +03:00
use App\Interfaces\Job\ShouldUpdate;
use App\Models\Common\Widget;
2021-09-06 11:53:57 +03:00
class UpdateWidget extends Job implements ShouldUpdate
{
2021-09-06 11:53:57 +03:00
public function handle(): Widget
{
\DB::transaction(function () {
2021-09-06 11:53:57 +03:00
$this->model->update($this->request->all());
});
2021-09-06 11:53:57 +03:00
return $this->model;
}
}