From a274c0891eaa649b946f97def45a906701122730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Sat, 18 Dec 2021 16:44:11 +0900 Subject: [PATCH] =?UTF-8?q?=E3=80=8CSMS=E9=80=81=E4=BF=A1=E3=80=81KIKI?= =?UTF-8?q?=E3=81=A8=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=9A=E3=80=81?= =?UTF-8?q?=E9=9B=BB=E8=A9=B1=E7=95=AA=E5=8F=B7=E3=81=8C=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=82=8B=E3=80=82from?= =?UTF-8?q?=E3=82=92KIKI=E3=81=AB=E5=A4=89=E6=9B=B4=E3=81=A7=E3=81=8A?= =?UTF-8?q?=E9=A1=98=E3=81=84=E3=81=84=E3=81=9F=E3=81=97=E3=81=BE=E3=81=99?= =?UTF-8?q?=E3=80=82=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/Http/Controllers/Api/ChildrenController.php | 2 +- backend/app/Notifications/SmsNotification.php | 1 + backend/composer.json | 3 ++- backend/composer.lock | 2 +- backend/config/services.php | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) 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', ], ];