feat: [fcm] Admin FCM API 추가 - MNG에서 API 호출로 FCM 발송
- AdminFcmController, AdminFcmService 추가 - FormRequest 검증 (AdminFcmSendRequest 등) - Swagger 문서 추가 (AdminFcmApi.php) - ApiKeyMiddleware: admin/fcm/* 화이트리스트 추가 - FCM 에러 메시지 i18n 추가
This commit is contained in:
37
app/Http/Requests/Admin/SendFcmRequest.php
Normal file
37
app/Http/Requests/Admin/SendFcmRequest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SendFcmRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'title' => 'required|string|max:255',
|
||||
'body' => 'required|string|max:1000',
|
||||
'tenant_id' => 'nullable|integer|exists:tenants,id',
|
||||
'user_id' => 'nullable|integer|exists:users,id',
|
||||
'platform' => 'nullable|string|in:android,ios,web',
|
||||
'channel_id' => 'nullable|string|max:50',
|
||||
'type' => 'nullable|string|max:50',
|
||||
'url' => 'nullable|string|max:500',
|
||||
'sound_key' => 'nullable|string|max:50',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'title.required' => __('validation.required', ['attribute' => '제목']),
|
||||
'body.required' => __('validation.required', ['attribute' => '내용']),
|
||||
'platform.in' => __('validation.in', ['attribute' => '플랫폼']),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user