Skip to content

Instantly share code, notes, and snippets.

@nonlocalize
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nonlocalize/4bd23affd589c0555519 to your computer and use it in GitHub Desktop.
Save nonlocalize/4bd23affd589c0555519 to your computer and use it in GitHub Desktop.
<?php
namespace YourProject\Services\Mailers;
class UserMailer extends Mailer
{
protected $user;
function __construct()
{
$this->user = \Auth::user();
}
public function subscribed()
{
$subject = 'Welcome to the site!';
$view = 'emails.user.subscribed';
$data = ['enter view data here'];
$this->emailTo($this->user, $view, $data, $subject);
}
public function upgraded()
{
$subject = 'Membership upgraded!';
$view = 'emails.user.upgraded';
$data = ['enter view data here'];
$this->emailTo($this->user, $view, $data, $subject);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment