akaunting/app/Jobs/Common/UpdateWidget.php
2021-09-06 11:53:57 +03:00

20 lines
372 B
PHP

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