mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-27 08:24:06 +00:00
41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Jobs;
|
|
|
|
use App\Classes\Modules\Accounting\Processors\CreateBankStatementDetailsProcessor;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use App\Models\AccountStatement;
|
|
|
|
class CreateBankStatementDetails implements ShouldQueue
|
|
{
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
/** @var AccountStatement $statement*/
|
|
private $statement;
|
|
|
|
/**
|
|
* CreateBankStatementDetails constructor.
|
|
* @param AccountStatement $statement
|
|
*/
|
|
public function __construct(AccountStatement $statement)
|
|
{
|
|
$this->statement = $statement;
|
|
}
|
|
|
|
public function handle()
|
|
{
|
|
(App()->make(CreateBankStatementDetailsProcessor::class))->execute($this->statement);
|
|
}
|
|
|
|
public function delay($delay)
|
|
{
|
|
// Add delay in seconds to the job
|
|
$this->delay = $delay;
|
|
return $this;
|
|
}
|
|
}
|