v2 first commit
This commit is contained in:
34
app/Jobs/Banking/DeleteTransfer.php
Normal file
34
app/Jobs/Banking/DeleteTransfer.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Banking;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
|
||||
class DeleteTransfer extends Job
|
||||
{
|
||||
protected $transfer;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param $transfer
|
||||
*/
|
||||
public function __construct($transfer)
|
||||
{
|
||||
$this->transfer = $transfer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->deleteRelationships($this->transfer, ['expense_transaction', 'income_transaction']);
|
||||
|
||||
$this->transfer->delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user