Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

SendCustomerInvoice.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace App\Jobs;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Queue\SerializesModels;
  5. use Illuminate\Queue\InteractsWithQueue;
  6. use Illuminate\Contracts\Queue\ShouldQueue;
  7. use Illuminate\Foundation\Bus\Dispatchable;
  8. use Illuminate\Support\Facades\Mail;
  9. use Exception;
  10. use App\Mail\CustomerInvoice;
  11. use App\Model\Form;
  12. use App\Model\Product;
  13. use App\Model\Subscriber;
  14. class SendCustomerInvoice implements ShouldQueue
  15. {
  16. use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  17. public $form,$recipient,$product;
  18. /**
  19. * Create a new job instance.
  20. *
  21. * @return void
  22. */
  23. public function __construct(Form $form, Product $product, $recipient)
  24. {
  25. //
  26. $this->form = $form;
  27. $this->recipient = $recipient;
  28. $this->product = $product;
  29. }
  30. /**
  31. * Execute the job.
  32. *
  33. * @return void
  34. */
  35. public function handle()
  36. {
  37. //
  38. Mail::to($this->recipient)->send(new CustomerInvoice($this->form,$this->product));
  39. }
  40. public function failed(Exception $exception)
  41. {
  42. //
  43. }
  44. }