Created
May 15, 2015 07:29
-
-
Save petehouston/aaafe23f9b38c1b67142 to your computer and use it in GitHub Desktop.
Passing data synchronously from queue in laravel
This file contains 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
/** | |
* The mailer contract | |
* | |
* @var Illuminate\Contracts\Mail\Mailer | |
*/ | |
protected $mail; | |
public function sendUserRegistered($user) | |
{ | |
$view = 'user_registered'; | |
$this->mail->send($view, $user , function($message) use ($user) | |
{ | |
$message->to($user->email, $user->name)->subject('Welcome to the Brotherhood!'); | |
}); | |
} |
This file contains 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, {{ $user->name }}</p> | |
<p>Hope you like the 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