ProjectAction.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace App\Mail;
  3. use App\Models\Container;
  4. use App\Models\Enums\ObjectAction;
  5. use App\Models\Project;
  6. use App\Models\Task;
  7. use Illuminate\Bus\Queueable;
  8. use Illuminate\Contracts\Queue\ShouldQueue;
  9. use Illuminate\Mail\Mailable;
  10. use Illuminate\Mail\Mailables\Content;
  11. use Illuminate\Mail\Mailables\Envelope;
  12. use Illuminate\Queue\SerializesModels;
  13. class ProjectAction extends Mailable
  14. {
  15. use Queueable, SerializesModels;
  16. /**
  17. * Create a new message instance.
  18. */
  19. public function __construct(public Project $project, protected ObjectAction $objectAction, public array $actions = [])
  20. {
  21. }
  22. /**
  23. * Get the message envelope.
  24. */
  25. public function envelope(): Envelope
  26. {
  27. return new Envelope(
  28. subject: $this->project->name,
  29. );
  30. }
  31. /**
  32. * Get the message content definition.
  33. */
  34. public function content(): Content
  35. {
  36. return new Content(
  37. //view: 'view.name',
  38. markdown: 'emails.actions.project',
  39. );
  40. }
  41. /**
  42. * Get the attachments for the message.
  43. *
  44. * @return array<int, \Illuminate\Mail\Mailables\Attachment>
  45. */
  46. public function attachments(): array
  47. {
  48. return [];
  49. }
  50. }