2019-11-16 10:21:14 +03:00
|
|
|
<?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()
|
|
|
|
{
|
2020-06-26 13:40:19 +03:00
|
|
|
\DB::transaction(function () {
|
|
|
|
$this->report->delete();
|
|
|
|
});
|
2019-11-16 10:21:14 +03:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|