|
- <?php
-
- namespace App\Mail\Members\Subscription;
-
- use App\Mail\Members\Member;
- use App\Models\SeasonTicketContractSubscriptionMessage;
-
- class Hold extends Member
- {
- private string $parkName;
- private string|null $message;
-
- /**
- * Create a new message instance.
- *
- * @return void
- */
- public function __construct(SeasonTicketContractSubscriptionMessage $message)
- {
- $context = $this->context();
- $parking = $context->getParking();
- if ($parking === null) {
- throw new AppCommonException("コンテキスト不正 駐車場情報");
- }
-
- $this->parkName = $parking->park_name;
- $this->message = $message->message;
- }
-
- public function getTemplateName(): string
- {
- return 'mails.members.subscription.hold';
- }
-
- public function getSubject(): string
- {
- return '【スマートパーキングパス】申込確認のお知らせ';
- }
-
- public function getMemberParams(): array
- {
- return [
- 'parkName' => $this->parkName,
- 'memo' => $this->message,
- ];
- }
- }
|