Skip to content

Commit

Permalink
认证后的消息提醒
Browse files Browse the repository at this point in the history
  • Loading branch information
summerblue committed Sep 19, 2019
1 parent 0cff7c6 commit 94fe028
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/Listeners/EmailVerified.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace App\Listeners;

use Illuminate\Auth\Events\Verified;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;

class EmailVerified
{
public function handle(Verified $event)
{
// 会话里闪存认证成功后的消息提醒
session()->flash('success', '邮箱验证成功 ^_^');
}
}
4 changes: 4 additions & 0 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class EventServiceProvider extends ServiceProvider
Registered::class => [
SendEmailVerificationNotification::class,
],

\Illuminate\Auth\Events\Verified::class => [
\App\Listeners\EmailVerified::class,
],
];

/**
Expand Down

0 comments on commit 94fe028

Please sign in to comment.