| @@ 10-48 (lines=39) @@ | ||
| 7 | use App\Judite\Models\Exchange; |
|
| 8 | use Illuminate\Queue\SerializesModels; |
|
| 9 | ||
| 10 | class ConfirmedExchangeNotification extends Mailable |
|
| 11 | { |
|
| 12 | use Queueable, SerializesModels; |
|
| 13 | ||
| 14 | /** |
|
| 15 | * The confirmed exchange. |
|
| 16 | * |
|
| 17 | * @var string |
|
| 18 | */ |
|
| 19 | private $exchange; |
|
| 20 | ||
| 21 | /** |
|
| 22 | * Create a new message instance. |
|
| 23 | * |
|
| 24 | * @param \App\Judite\Models\Exchange $exchange |
|
| 25 | */ |
|
| 26 | public function __construct(Exchange $exchange) |
|
| 27 | { |
|
| 28 | $this->exchange = $exchange; |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * Build the message. |
|
| 33 | * |
|
| 34 | * @return $this |
|
| 35 | */ |
|
| 36 | public function build() |
|
| 37 | { |
|
| 38 | $course = $this->exchange->course(); |
|
| 39 | $fromStudent = $this->exchange->fromStudent(); |
|
| 40 | $toStudent = $this->exchange->toStudent(); |
|
| 41 | $fromShift = $this->exchange->fromShift(); |
|
| 42 | $toShift = $this->exchange->toShift(); |
|
| 43 | ||
| 44 | return $this->markdown('emails.exchanges.confirmed', |
|
| 45 | compact('course', 'fromStudent', 'toStudent', 'fromShift', 'toShift')); |
|
| 46 | } |
|
| 47 | } |
|
| 48 | ||
| @@ 10-48 (lines=39) @@ | ||
| 7 | use App\Judite\Models\Exchange; |
|
| 8 | use Illuminate\Queue\SerializesModels; |
|
| 9 | ||
| 10 | class DeclinedExchangeNotification extends Mailable |
|
| 11 | { |
|
| 12 | use Queueable, SerializesModels; |
|
| 13 | ||
| 14 | /** |
|
| 15 | * The declined exchange. |
|
| 16 | * |
|
| 17 | * @var string |
|
| 18 | */ |
|
| 19 | private $exchange; |
|
| 20 | ||
| 21 | /** |
|
| 22 | * Create a new message instance. |
|
| 23 | * |
|
| 24 | * @param \App\Judite\Models\Exchange|\App\Safira\Models\Exchange $exchange |
|
| 25 | */ |
|
| 26 | public function __construct(Exchange $exchange) |
|
| 27 | { |
|
| 28 | $this->exchange = $exchange; |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * Build the message. |
|
| 33 | * |
|
| 34 | * @return $this |
|
| 35 | */ |
|
| 36 | public function build() |
|
| 37 | { |
|
| 38 | $course = $this->exchange->course(); |
|
| 39 | $fromStudent = $this->exchange->fromStudent(); |
|
| 40 | $toStudent = $this->exchange->toStudent(); |
|
| 41 | $fromShift = $this->exchange->fromShift(); |
|
| 42 | $toShift = $this->exchange->toShift(); |
|
| 43 | ||
| 44 | return $this->markdown('emails.exchanges.declined', |
|
| 45 | compact('course', 'fromStudent', 'toStudent', 'fromShift', 'toShift')); |
|
| 46 | } |
|
| 47 | } |
|
| 48 | ||