v2 first commit

This commit is contained in:
denisdulici
2019-11-16 10:21:14 +03:00
parent 5b23e9c2c4
commit 6d50fa8442
3075 changed files with 3451681 additions and 65594 deletions

View File

@ -0,0 +1,36 @@
<?php
namespace App\Jobs\Income;
use App\Abstracts\Job;
use App\Events\Income\InvoiceCreated;
use App\Models\Income\Invoice;
class DuplicateInvoice extends Job
{
protected $invoice;
/**
* Create a new job instance.
*
* @param $invoice
*/
public function __construct($invoice)
{
$this->invoice = $invoice;
}
/**
* Execute the job.
*
* @return Invoice
*/
public function handle()
{
$clone = $this->invoice->duplicate();
event(new InvoiceCreated($clone));
return $clone;
}
}