| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
-
- namespace App\Jobs;
-
- use Illuminate\Bus\Queueable;
- use Illuminate\Queue\SerializesModels;
- use Illuminate\Queue\InteractsWithQueue;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Foundation\Bus\Dispatchable;
- use Illuminate\Support\Facades\Mail;
- use Exception;
-
- use App\Mail\CustomerBInvoice;
- use App\Model\Form;
- use App\Model\Product;
- use App\Model\Subscriber;
-
- class SendCustomerInvoiceB implements ShouldQueue
- {
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
- public $form,$recipient,$product;
-
- /**
- * Create a new job instance.
- *
- * @return void
- */
- public function __construct(Form $form, Product $product, $recipient)
- {
- //
- $this->form = $form;
- $this->recipient = $recipient;
- $this->product = $product;
- }
-
- /**
- * Execute the job.
- *
- * @return void
- */
- public function handle()
- {
- //
- Mail::to($this->recipient)->send(new CustomerBInvoice($this->form,$this->product));
- }
-
- public function failed(Exception $exception)
- {
- //
- }
- }
|