akaunting/app/Jobs/Common/DeleteWidget.php
Cüneyt Şentürk bf5fc4f363 fixed jobs..
2021-09-04 16:08:13 +03:00

35 lines
516 B
PHP

<?php
namespace App\Jobs\Common;
use App\Abstracts\Job;
class DeleteWidget extends Job
{
protected $widget;
/**
* Create a new job instance.
*
* @param $widget
*/
public function __construct($widget)
{
$this->widget = $widget;
}
/**
* Execute the job.
*
* @return boolean|Exception
*/
public function handle()
{
\DB::transaction(function () {
$this->widget->delete();
});
return true;
}
}