diff --git a/backend/app/Http/Controllers/Api/ChildrenController.php b/backend/app/Http/Controllers/Api/ChildrenController.php index 6af77916..d769af8f 100644 --- a/backend/app/Http/Controllers/Api/ChildrenController.php +++ b/backend/app/Http/Controllers/Api/ChildrenController.php @@ -168,7 +168,7 @@ class ChildrenController extends Controller { // SMSを送ります。 $message = view('sms.children.register.main', ['tel' => $r->tel, 'password' => $r->password]); - \Notification::route('nexmo', '81'.substr($r->tel, 1))->notify(new SmsNotification($message)); + \Notification::route('nexmo', '81'.substr($get->tel, 1))->notify(new SmsNotification($message)); DB::commit(); } catch (\Throwable $e) { diff --git a/backend/app/Notifications/SmsNotification.php b/backend/app/Notifications/SmsNotification.php index e0139e1c..3b9d55fb 100644 --- a/backend/app/Notifications/SmsNotification.php +++ b/backend/app/Notifications/SmsNotification.php @@ -43,6 +43,7 @@ class SmsNotification extends Notification { return (new NexmoMessage()) ->content($this->message) + ->from('KIKI') ->unicode(); } diff --git a/backend/composer.json b/backend/composer.json index 63885810..d3d96064 100644 --- a/backend/composer.json +++ b/backend/composer.json @@ -12,7 +12,8 @@ "intervention/image": "^2.7", "laravel/framework": "^8.12", "laravel/nexmo-notification-channel": "^2.5", - "laravel/tinker": "^2.5" + "laravel/tinker": "^2.5", + "nexmo/laravel": "^2.4" }, "require-dev": { "facade/ignition": "^2.5", diff --git a/backend/composer.lock b/backend/composer.lock index ec85cdd8..652c3a3e 100644 --- a/backend/composer.lock +++ b/backend/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9c7f3f3ae06176c13a2e71065d0491b6", + "content-hash": "04ab94d1f04d3f8c89e2f15bc4e9af74", "packages": [ { "name": "asm89/stack-cors", diff --git a/backend/config/services.php b/backend/config/services.php index a58284b7..fe4ced38 100644 --- a/backend/config/services.php +++ b/backend/config/services.php @@ -33,7 +33,7 @@ return [ 'nexmo' => [ 'key' => env('NEXMO_KEY'), 'secret' => env('NEXMO_SECRET'), - 'sms_from' => '819012345678', + 'sms_from' => 'KIKI', ], ];