Created
May 15, 2015 07:39
-
-
Save petehouston/9494beda140c30f0d184 to your computer and use it in GitHub Desktop.
Passing data to queue in Laravel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function sendUserRegistered($user) | |
{ | |
$view = 'user_registered'; | |
$data = [ | |
'email' => $user->email, | |
'name' => $user->name, | |
'token' => $user->verification->token | |
]; | |
$this->mail->queue($view, $data , function($message) use ($data) | |
{ | |
$message->to($user->email, $user->name)->subject('Welcome to the Brotherhood'); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> Welcome, {{ $name }} </p> | |
<p> Hope you like to Brotherhood in Laravel. </p> | |
<p> Best Regards </p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment