osb/app/Mail/SocialLink.php
2021-06-29 16:40:54 +10:00

44 lines
712 B
PHP

<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use App\Models\{AccountOauth,User};
class SocialLink extends Mailable
{
use Queueable, SerializesModels;
public $token;
public $user;
/**
* Create a new message instance.
*
* @param User $o
* @param string $token
*/
public function __construct(AccountOauth $o)
{
$this->token = $o->link_token;
$this->user = $o->account->user;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this
->markdown('email.system.social_link')
->subject('Link your Account')
->with([
'site'=>$this->user->site,
]);
}
}