diff --git a/app/Notifications/VerifyNotification.php b/app/Notifications/VerifyNotification.php
new file mode 100644
index 0000000000000000000000000000000000000000..7075f89d24249d3791b195986d7f6bffab8874fb
--- /dev/null
+++ b/app/Notifications/VerifyNotification.php
@@ -0,0 +1,84 @@
+subject('Verifique seu e-mail')
+ ->greeting("Olá, {$user->name}!")
+ ->action(
+ 'Verifique seu E-mail',
+ $this->verificationUrl($notifiable)
+ )
+ ->line("Por favor clique no link acima para verificar seu endereço de e-mail.")
+ ->line('Se você não criou uma conta, nenhuma ação adicional é necessária.')
+ ->markdown('vendor.notifications.email');
+ }
+
+ /**
+ * Get the array representation of the notification.
+ *
+ * @param mixed $notifiable
+ * @return array
+ */
+ public function toArray($notifiable)
+ {
+ return [
+ //
+ ];
+ }
+ protected function verificationUrl($notifiable)
+ {
+ return URL::temporarySignedRoute(
+ 'verification.verify',
+ Carbon::now()->addMinute(Config::get('auth.verification.expire', 60)),
+ [
+ 'id' => $notifiable->getKey(),
+ 'hash' => sha1($notifiable->getEmailForVerification()),
+ ]
+ );
+ }
+}
diff --git a/app/User.php b/app/User.php
index 0a42835ded4015a611fcb5f0ef3f7c3592035f5a..a15b4c9fdf3e7668ee1287d20f5af1f7672d74ff 100644
--- a/app/User.php
+++ b/app/User.php
@@ -2,11 +2,12 @@
namespace App;
-use Illuminate\Contracts\Auth\MustVerifyEmail;
-use Illuminate\Foundation\Auth\User as Authenticatable;
+use App\Notifications\recuperacaoSenha;
use Illuminate\Notifications\Notifiable;
+use App\Notifications\VerifyNotification;
+use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Contracts\Auth\CanResetPassword;
-use App\Notifications\recuperacaoSenha;
+use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements MustVerifyEmail
{
@@ -99,4 +100,8 @@ class User extends Authenticatable implements MustVerifyEmail
$this->notify(new recuperacaoSenha($token));
}
+ public function sendEmailVerificationNotification(){
+ $this->notify(new VerifyNotification());
+ }
+
}
diff --git a/resources/views/vendor/notifications/email.blade.php b/resources/views/vendor/notifications/email.blade.php
index 426656d7d4a47abeafd5381caf1d63ed6ca9e97a..bf187047c0ad574bc32f031fbeaa916a84a21bed 100644
--- a/resources/views/vendor/notifications/email.blade.php
+++ b/resources/views/vendor/notifications/email.blade.php
@@ -43,9 +43,9 @@
@if (! empty($salutation))
{{ $salutation }}
@else
-@lang('Atenciosamente'),
+
@lang('Atenciosamente'),
{{ config('app.name') }}
-Laboratório Multidisciplinar de Tecnologias Sociais
+Laboratório Multidisciplinar de Tecnologias Sociais
Universidade Federal do Agreste de Pernambuco
@endif