diff --git a/app/Http/Controllers/FcmController.php b/app/Http/Controllers/FcmController.php index 43dbd830..3035329e 100644 --- a/app/Http/Controllers/FcmController.php +++ b/app/Http/Controllers/FcmController.php @@ -97,10 +97,9 @@ public function sendPush(Request $request): View 'tenant_id' => 'nullable|integer|exists:tenants,id', 'user_id' => 'nullable|integer', 'platform' => 'nullable|string|in:android,ios,web', - 'channel_id' => 'nullable|string|max:50', + 'channel_id' => 'nullable|string|in:push_default,push_urgent,push_payment,push_sales_order,push_purchase_order,push_contract', 'type' => 'nullable|string|max:50', 'url' => 'nullable|string|max:500', - 'sound_key' => 'nullable|string|max:50', ]); // API 서버로 발송 요청 @@ -111,10 +110,9 @@ public function sendPush(Request $request): View 'tenant_id' => $request->get('tenant_id'), 'user_id' => $request->get('user_id'), 'platform' => $request->get('platform'), - 'channel_id' => $request->get('channel_id'), + 'channel_id' => $request->get('channel_id', 'push_default'), 'type' => $request->get('type'), 'url' => $request->get('url'), - 'sound_key' => $request->get('sound_key'), ]), auth()->id() ); diff --git a/resources/views/fcm/send.blade.php b/resources/views/fcm/send.blade.php index 6f8bfe34..ae423b91 100644 --- a/resources/views/fcm/send.blade.php +++ b/resources/views/fcm/send.blade.php @@ -93,6 +93,20 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc placeholder="알림 내용" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> + +
+ + +

알림 타입에 따라 다른 알림음이 재생됩니다.

+

@@ -102,18 +116,12 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc 고급 설정
- - -
-
- + +

앱에서 알림 클릭 시 처리할 데이터 타입

@@ -121,14 +129,7 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc name="url" placeholder="예: /notices/123" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> -
-
- - +

앱 내 이동할 경로 (선택)