1 | <?php |
||
9 | class PendingUserEmail extends Model |
||
10 | { |
||
11 | /** |
||
12 | * This model won't be updated. |
||
13 | */ |
||
14 | const UPDATED_AT = null; |
||
15 | |||
16 | /** |
||
17 | * User relationship |
||
18 | * |
||
19 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
20 | */ |
||
21 | public function user() |
||
25 | |||
26 | /** |
||
27 | * Scope for the user. |
||
28 | * |
||
29 | * @param $query |
||
30 | * @param \Illuminate\Database\Eloquent\Model $user |
||
31 | * @return void |
||
32 | */ |
||
33 | public function scopeForUser($query, Model $user) |
||
40 | |||
41 | /** |
||
42 | * Updates the associated user and removes all pending models with this email. |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | public function activate() |
||
58 | |||
59 | /** |
||
60 | * Creates a temporary signed URL to verify the pending email. |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | public function verificationUrl(): string |
||
72 | } |
||
73 |