-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add custom mail * fix code style * Add custom mail for forgot password * Fix test * Improve mail context * Apply suggestions from code review Co-authored-by: Ewelina Skrzypacz <56546832+EwelinaSkrzypacz@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ewelina Skrzypacz <56546832+EwelinaSkrzypacz@users.noreply.github.com> * Refactor callback function * Update resources/views/emails/auth/verify.blade.php Co-authored-by: Aleksandra Kozubal <104600942+AleksandraKozubal@users.noreply.github.com> --------- Co-authored-by: Ewelina Skrzypacz <56546832+EwelinaSkrzypacz@users.noreply.github.com> Co-authored-by: Aleksandra Kozubal <104600942+AleksandraKozubal@users.noreply.github.com>
- Loading branch information
1 parent
143579e
commit 51f1262
Showing
8 changed files
with
104 additions
and
19 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Notifications; | ||
|
||
use Illuminate\Bus\Queueable; | ||
use Illuminate\Notifications\Messages\MailMessage; | ||
use Illuminate\Notifications\Notification; | ||
|
||
class ResetPasswordNotification extends Notification | ||
{ | ||
use Queueable; | ||
|
||
public function __construct( | ||
protected string $token, | ||
) {} | ||
|
||
public function via(object $notifiable): array | ||
{ | ||
return ["mail"]; | ||
} | ||
|
||
public function toMail(object $notifiable): MailMessage | ||
{ | ||
$resetUrl = url("/auth/password/reset/" . $this->token . "&email=" . urlencode($notifiable->email)); | ||
|
||
return (new MailMessage()) | ||
->subject("Resetowanie hasła") | ||
->view("emails.auth.reset-password", [ | ||
"user" => $notifiable, | ||
"url" => $resetUrl, | ||
]); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html lang="pl"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Zresetuj hasło</title> | ||
</head> | ||
|
||
<header> | ||
<img src="favicon.png" alt="{{ config('app.name') }} Logo" width="150" height="50"> | ||
<h1>{{ config('app.name') }}</h1> | ||
</header> | ||
|
||
<body> | ||
<h1>Cześć {{ $user->name }},</h1> | ||
|
||
<p>Otrzymaliśmy prośbę o zresetowanie hasła dla Twojego konta.</p> | ||
|
||
<p>Aby zresetować swoje hasło, kliknij poniższy link:</p> | ||
|
||
<a href="{{ $url }}">Zresetuj hasło</a> | ||
|
||
|
||
<p>Pozdrawiamy,<br>{{ config('app.name') }}</p> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html lang="pl"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title> {{ config('app.name') }}</title> | ||
</head> | ||
|
||
<header> | ||
<img src="" alt="{{ config('app.name') }} Logo" width="150" height="50"> | ||
<h1>{{ config('app.name') }}</h1> | ||
</header> | ||
|
||
<body> | ||
<p>Cześć {{ $user->name }},</p> | ||
|
||
<p>Aby zweryfikować swoje konto, kliknij poniższy link:</p> | ||
|
||
<a href="{{ $url }}">Zweryfikuj e-mail </a> | ||
|
||
<p>Jeśli to nie Ty wysłałeś/aś tę prośbę, po prostu zignoruj tę wiadomość.</p> | ||
|
||
<p>Pozdrawiamy,<br>{{ config('app.name') }}</p> | ||
</body> | ||
|
||
</html> |
This file was deleted.
Oops, something went wrong.
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