20 lines
372 B
PHP
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;
|
|
}
|
|
}
|