Skip to content

Instantly share code, notes, and snippets.

@axieum
Created July 10, 2018 13:30
Show Gist options
  • Save axieum/eebaf13cc6969e984cbbc9c421a9e787 to your computer and use it in GitHub Desktop.
Save axieum/eebaf13cc6969e984cbbc9c421a9e787 to your computer and use it in GitHub Desktop.
Laravel Example class for a email verification
<?php
namespace App\Mail;
use App\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class AccountVerity extends Mailable implements ShouldQueue
{
use Queueable, SerializesModels;
public $user, $token;
/**
* Create a new message instance.
*
* @param App\User
* @return void
*/
public function __construct($user, $token)
{
$this->user = $user;
$this->token = $token;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->view('mail.account.verity');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment