feat: [esign] 로그인 페이지에 전자계약 서명 바로가기 추가

- 알림톡 버튼 클릭 시 전화번호 입력으로 서명 페이지 이동
- 바로빌 템플릿 URL 변경 전 임시 우회 방법
This commit is contained in:
김보곤
2026-02-24 19:03:24 +09:00
parent 504f59dc99
commit 13567217a7
3 changed files with 55 additions and 0 deletions

View File

@@ -22,6 +22,30 @@
class EsignPublicController extends Controller
{
// ─── 전자계약 서명 확인 (전화번호 기반) ───
public function verifyPhone(Request $request)
{
$phone = preg_replace('/[^0-9]/', '', $request->input('phone', ''));
if (strlen($phone) < 10) {
return back()->withErrors(['phone' => '올바른 전화번호를 입력해 주세요.']);
}
$signer = EsignSigner::withoutGlobalScopes()
->where('phone', $phone)
->whereIn('status', ['pending', 'notified'])
->whereHas('contract', fn ($q) => $q->where('status', 'pending'))
->latest('created_at')
->first();
if (! $signer) {
return back()->withErrors(['phone' => '대기 중인 전자계약이 없습니다.']);
}
return redirect("/esign/sign/{$signer->access_token}");
}
// ─── 화면 라우트 ───
public function auth(string $token): View