Created
October 19, 2023 12:09
-
-
Save neverything/0ac095e5e67942ca64f7710ab0bb9ee4 to your computer and use it in GitHub Desktop.
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
<?php | |
namespace App\Listeners; | |
use App\Events\RequestMagicLoginLink; | |
use App\Models\User; | |
class SendMagicLoginLinkNotification | |
{ | |
/** | |
* Handle the event. | |
*/ | |
public function handle(RequestMagicLoginLink $event): void | |
{ | |
if ($event->user instanceof User) { | |
$event->user->sendMagicLoginLinkNotification(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment