File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * This file is part of Jrean\UserVerification package.
4+ *
5+ * (c) Jean Ragouin <[email protected] > <www.askjong.com> 6+ */
7+ namespace Jrean \UserVerification \Events ;
8+
9+ use Illuminate \Queue \SerializesModels ;
10+
11+ class UserVerified
12+ {
13+ use SerializesModels;
14+
15+ /**
16+ * The authenticated user.
17+ *
18+ * @var \Illuminate\Contracts\Auth\Authenticatable
19+ */
20+ public $ user ;
21+
22+ /**
23+ * Create a new event instance.
24+ *
25+ * @param \Illuminate\Contracts\Auth\Authenticatable $user
26+ * @return void
27+ */
28+ public function __construct ($ user )
29+ {
30+ $ this ->user = $ user ;
31+ }
32+ }
Original file line number Diff line number Diff line change 1111use Illuminate \Database \Schema \Builder ;
1212use Illuminate \Support \Facades \DB ;
1313use Illuminate \Support \Str ;
14+ use Jrean \UserVerification \Events \UserVerified ;
1415use Jrean \UserVerification \Events \VerificationEmailSent ;
1516use Jrean \UserVerification \Exceptions \ModelNotCompliantException ;
1617use Jrean \UserVerification \Exceptions \TokenMismatchException ;
@@ -305,6 +306,8 @@ protected function wasVerified($user)
305306 $ user ->verified = true ;
306307
307308 $ this ->updateUser ($ user );
309+
310+ event (new UserVerified ($ user ));
308311 }
309312
310313 /**
You can’t perform that action at this time.
0 commit comments