Skip to content

Commit

Permalink
Use Markdown mailable for registration mail, fixes OpenDominion#55
Browse files Browse the repository at this point in the history
  • Loading branch information
WaveHack committed Mar 29, 2017
1 parent 1d0293d commit 0e5d049
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
19 changes: 17 additions & 2 deletions app/resources/views/emails/auth/registration.blade.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
<p>Thank you for registering to OpenDominion.</p>
<p>Click <a href="{{ route('auth.activate', $activation_code) }}">here</a> to activate your account.</p>
@component('mail::message')
Hello {{ $user->display_name }} and welcome to OpenDominion!

Before you can start playing you need to activate your account:

@component('mail::button', ['url' => route('auth.activate', $user->activation_code)])
Activate
@endcomponent

If that doesn't work, try pasting this in the browser: {{ route('auth.activate', $user->activation_code) }}

For reporting issues, use the [issue tracker](https://github.com/WaveHack/OpenDominion/issues) on GitHub.

Have fun playing!

OpenDominion
@endcomponent
6 changes: 2 additions & 4 deletions src/Mail/UserRegistrationMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class UserRegistrationMail extends Mailable
use Queueable, SerializesModels;

/** @var User */
protected $user;
public $user;

/**
* Create a new message instance.
Expand All @@ -32,8 +32,6 @@ public function __construct(User $user)
*/
public function build()
{
return $this->view('emails.auth.registration', [
'activation_code' => $this->user->activation_code,
]);
return $this->markdown('emails.auth.registration');
}
}

0 comments on commit 0e5d049

Please sign in to comment.