Changeset View
Changeset View
Standalone View
Standalone View
src/app/Mail/SignupVerification.php
<?php | <?php | ||||
namespace App\Mail; | namespace App\Mail; | ||||
use App\SignupCode; | use App\SignupCode; | ||||
use App\Utils; | |||||
use Illuminate\Bus\Queueable; | use Illuminate\Bus\Queueable; | ||||
use Illuminate\Mail\Mailable; | use Illuminate\Mail\Mailable; | ||||
use Illuminate\Queue\SerializesModels; | use Illuminate\Queue\SerializesModels; | ||||
use Illuminate\Support\Str; | use Illuminate\Support\Str; | ||||
class SignupVerification extends Mailable | class SignupVerification extends Mailable | ||||
{ | { | ||||
use Queueable; | use Queueable; | ||||
Show All 17 Lines | class SignupVerification extends Mailable | ||||
/** | /** | ||||
* Build the message. | * Build the message. | ||||
* | * | ||||
* @return $this | * @return $this | ||||
*/ | */ | ||||
public function build() | public function build() | ||||
{ | { | ||||
$href = sprintf( | $href = Utils::serviceUrl( | ||||
'%s/signup/%s-%s', | sprintf('/signup/%s-%s', $this->code->short_code, $this->code->code) | ||||
\config('app.url'), | |||||
$this->code->short_code, | |||||
$this->code->code | |||||
); | ); | ||||
$username = $this->code->data['first_name'] ?? ''; | $username = $this->code->data['first_name'] ?? ''; | ||||
if (!empty($this->code->data['last_name'])) { | if (!empty($this->code->data['last_name'])) { | ||||
$username .= ' ' . $this->code->data['last_name']; | $username .= ' ' . $this->code->data['last_name']; | ||||
} | } | ||||
$username = trim($username); | $username = trim($username); | ||||
Show All 36 Lines |