neayi /
insights
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Mail; |
||
| 4 | |||
| 5 | use Illuminate\Bus\Queueable; |
||
| 6 | use Illuminate\Contracts\Queue\ShouldQueue; |
||
| 7 | use Illuminate\Mail\Mailable; |
||
| 8 | use Illuminate\Queue\SerializesModels; |
||
| 9 | |||
| 10 | class InvitationLinkToOrganization extends Mailable |
||
| 11 | { |
||
| 12 | use Queueable, SerializesModels; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 13 | |||
| 14 | private $hash; |
||
| 15 | private $email; |
||
| 16 | private $firstname; |
||
| 17 | private $lastname; |
||
| 18 | private $organization; |
||
| 19 | |||
| 20 | public function __construct(string $hash, string $email, string $organization, string $firstname = null, string $lastname = null) |
||
| 21 | { |
||
| 22 | $this->hash = $hash; |
||
| 23 | $this->email = $email; |
||
| 24 | $this->firstname = $firstname; |
||
| 25 | $this->lastname = $lastname; |
||
| 26 | $this->organization = $organization; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function build() |
||
| 30 | { |
||
| 31 | $link = route('organization.invite.show').'?&token='.$this->hash; |
||
| 32 | return $this->view('mails.invitationLinkToOrganization', [ |
||
| 33 | 'link' => $link, |
||
| 34 | 'firstname' => $this->firstname, |
||
| 35 | 'organization' => $this->organization |
||
| 36 | ]); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |