akaunting/app/Jobs/Common/DeleteReport.php
2020-06-26 13:40:19 +03:00

35 lines
516 B
PHP

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