Added oauth login
This commit is contained in:
@@ -35,12 +35,12 @@ class OrderRequest extends Mailable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
switch ($this->service->category)
|
||||
switch (get_class($this->service->type))
|
||||
{
|
||||
case 'ADSL': $subject = sprintf('%s: %s',$this->service->category,$this->service->service_adsl->service_address);
|
||||
case 'App\Models\Service\Adsl': $subject = sprintf('NBN: %s',$this->service->type->service_address);
|
||||
break;
|
||||
|
||||
case 'VOIP': $subject = sprintf('%s: %s',$this->service->category,$this->service->service_voip->service_number);
|
||||
case 'App\Models\Service\Voip': $subject = sprintf('VOIP: %s',$this->service->type->service_number);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
43
app/Mail/SocialLink.php
Normal file
43
app/Mail/SocialLink.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
use App\Models\AccountOauth;
|
||||
use App\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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this
|
||||
->markdown('email.system.social_link')
|
||||
->subject('Link your Account')
|
||||
->with(['site'=>$this->user->site]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user