feat: [sms] SMS 발송 테스트 메뉴 추가
- SmsController (WEB): 카카오톡 패턴 동일한 HX-Redirect 처리 - BarobillSmsController (API): 발송, 발신번호 조회/확인, 전송상태 조회 - SMS 발송 테스트 블레이드 뷰: 발신번호 목록, 바이트 카운터, 발송 결과 표시 - web.php: barobill/sms/send 라우트 추가 - api.php: barobill/sms API 라우트 4개 추가
This commit is contained in:
29
app/Http/Controllers/Barobill/SmsController.php
Normal file
29
app/Http/Controllers/Barobill/SmsController.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Barobill;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Barobill\BarobillMember;
|
||||
use App\Models\Tenants\Tenant;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class SmsController extends Controller
|
||||
{
|
||||
/**
|
||||
* SMS 발송 테스트
|
||||
*/
|
||||
public function send(Request $request): View|Response
|
||||
{
|
||||
if ($request->header('HX-Request')) {
|
||||
return response('', 200)->header('HX-Redirect', route('barobill.sms.send'));
|
||||
}
|
||||
|
||||
$tenantId = session('selected_tenant_id', 1);
|
||||
$currentTenant = Tenant::find($tenantId);
|
||||
$barobillMember = BarobillMember::where('tenant_id', $tenantId)->first();
|
||||
|
||||
return view('barobill.sms.send.index', compact('currentTenant', 'barobillMember'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user