2019-09-03 04:43:59 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Mail;
|
|
|
|
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
2022-08-12 04:53:06 +00:00
|
|
|
use App\Models\{Site,User,UserOauth};
|
2019-09-03 04:43:59 +00:00
|
|
|
|
|
|
|
class SocialLink extends Mailable
|
|
|
|
{
|
|
|
|
use Queueable, SerializesModels;
|
|
|
|
|
2021-09-29 06:20:22 +00:00
|
|
|
public string $token;
|
2022-08-12 04:53:06 +00:00
|
|
|
public Site $site;
|
|
|
|
public ?User $user;
|
2019-09-03 04:43:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new message instance.
|
|
|
|
*
|
2022-08-12 04:53:06 +00:00
|
|
|
* @param UserOauth $o
|
2019-09-03 04:43:59 +00:00
|
|
|
*/
|
2022-08-12 04:53:06 +00:00
|
|
|
public function __construct(UserOauth $o)
|
2019-09-03 04:43:59 +00:00
|
|
|
{
|
2022-08-12 04:53:06 +00:00
|
|
|
$this->site = $o->site;
|
2019-09-03 04:43:59 +00:00
|
|
|
$this->token = $o->link_token;
|
2022-08-12 04:53:06 +00:00
|
|
|
$this->user = $o->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([
|
2022-08-12 04:53:06 +00:00
|
|
|
'site'=>$this->site,
|
|
|
|
]);
|
2019-09-03 04:43:59 +00:00
|
|
|
}
|
|
|
|
}
|