diff --git a/src/Notifications/VerificationCodeCreated.php b/src/Notifications/VerificationCodeCreated.php index c5aa657..876abca 100644 --- a/src/Notifications/VerificationCodeCreated.php +++ b/src/Notifications/VerificationCodeCreated.php @@ -13,7 +13,7 @@ class VerificationCodeCreated extends Notification implements ShouldQueue, Verif public $code; - public function __construct(string $code) + public function __construct(string $code, ...$args) { $this->code = $code; } diff --git a/src/Notifications/VerificationCodeCreatedInterface.php b/src/Notifications/VerificationCodeCreatedInterface.php index 6f44b03..5ae116a 100644 --- a/src/Notifications/VerificationCodeCreatedInterface.php +++ b/src/Notifications/VerificationCodeCreatedInterface.php @@ -4,5 +4,5 @@ interface VerificationCodeCreatedInterface { - public function __construct(string $code); + public function __construct(string $code, ...$args); } diff --git a/src/VerificationCodeManager.php b/src/VerificationCodeManager.php index 2f45dac..7301471 100644 --- a/src/VerificationCodeManager.php +++ b/src/VerificationCodeManager.php @@ -15,7 +15,7 @@ class VerificationCodeManager /** * Create and send a verification code. */ - public function send(string $verifiable, string $channel = 'mail') : void + public function send(string $verifiable, string $channel = 'mail', ...$args) : void { if ($this->isTestVerifiable($verifiable)) { return; @@ -24,7 +24,7 @@ public function send(string $verifiable, string $channel = 'mail') : void $code = $this->getModelClass()::createFor($verifiable); $notificationClass = $this->getNotificationClass(); - $notification = new $notificationClass($code); + $notification = new $notificationClass($code, $args); if ($notification instanceof ShouldQueue) { $notification->onQueue(config('verification-code.queue', null));