diff --git a/src/KudiSmsChannel.php b/src/KudiSmsChannel.php index 05c658c..bd09730 100644 --- a/src/KudiSmsChannel.php +++ b/src/KudiSmsChannel.php @@ -57,6 +57,7 @@ public function send($notifiable, Notification $notification) try { $to = $this->getTo($notifiable, $notification); $message = $notification->toKudiSms($notifiable); + if (is_string($message)) { $message = new KudiSmsMessage($message); } diff --git a/tests/Models/User.php b/tests/Models/User.php index f1cbf18..338b6f0 100644 --- a/tests/Models/User.php +++ b/tests/Models/User.php @@ -38,8 +38,8 @@ public function routeNotificationForKudiSms() return $this->phone; } - // public function phoneNumber(): Attribute - // { - // return Attribute::make(fn () => $this->phone); - // } + public function phoneNumber(): Attribute + { + return Attribute::make(fn () => $this->phone); + } }