Skip to content

Instantly share code, notes, and snippets.

@neverything
Created October 19, 2023 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neverything/0ac095e5e67942ca64f7710ab0bb9ee4 to your computer and use it in GitHub Desktop.
Save neverything/0ac095e5e67942ca64f7710ab0bb9ee4 to your computer and use it in GitHub Desktop.
<?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