Send Markdown mail in the Material theme
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V9NnLxnPp8vaaurb3Z1MFy
This commit is contained in:
co-authored by
Claude Opus 5
parent
bc69066ead
commit
eb33bf77cc
@@ -115,4 +115,26 @@ return [
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Markdown Mail Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Markdown mail wears Livewire Material's theme, coloured from the light
|
||||
| scheme in resources/css/material-scheme.json.
|
||||
|
|
||||
*/
|
||||
|
||||
'markdown' => [
|
||||
'theme' => env('MAIL_MARKDOWN_THEME', 'livewire-material::mail.theme'),
|
||||
|
||||
'paths' => [
|
||||
resource_path('views/vendor/mail'),
|
||||
],
|
||||
|
||||
'extensions' => [
|
||||
// \League\CommonMark\Extension\Strikethrough\StrikethroughExtension::class,
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
@@ -58,3 +58,14 @@ test('password can be reset with valid token', function () {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
test('reset password mail wears the material theme in the app scheme', function () {
|
||||
$user = User::factory()->create();
|
||||
$scheme = json_decode(file_get_contents(resource_path('css/material-scheme.json')), true);
|
||||
|
||||
$html = (string) (new ResetPassword('token'))->toMail($user)->render();
|
||||
|
||||
expect($html)
|
||||
->toContain('background-color: '.$scheme['light']['primary'])
|
||||
->toContain(route('password.reset', ['token' => 'token', 'email' => $user->email]));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user