osb/app/Mail/SocialLink.php

43 lines
706 B
PHP
Raw Normal View History

2019-09-03 04:43:59 +00:00
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
2021-06-29 03:18:52 +00:00
use App\Models\{AccountOauth,User};
2019-09-03 04:43:59 +00:00
class SocialLink extends Mailable
{
use Queueable, SerializesModels;
public string $token;
public User $user;
2019-09-03 04:43:59 +00:00
/**
* Create a new message instance.
*
* @param AccountOauth $o
2019-09-03 04:43:59 +00:00
*/
public function __construct(AccountOauth $o)
{
$this->token = $o->link_token;
2020-01-21 09:59:10 +00:00
$this->user = $o->account->user;
2019-09-03 04:43:59 +00:00
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this
->markdown('email.system.social_link')
->subject('Link your Account')
2020-01-21 09:59:10 +00:00
->with([
'site'=>$this->user->site,
]);
2019-09-03 04:43:59 +00:00
}
}