osb/app/Mail/SocialLink.php

44 lines
712 B
PHP
Raw Permalink 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 $token;
public $user;
/**
* Create a new message instance.
*
* @param User $o
* @param string $token
*/
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
}
}