feat. 會員端google auth 加入,加入一些valid
This commit is contained in:
parent
87a0ddf7bd
commit
d022b0635a
@ -90,8 +90,9 @@ public function handleProviderCallback(Request $request)
|
|||||||
'name' => $name,
|
'name' => $name,
|
||||||
'line_id' => $lineId,
|
'line_id' => $lineId,
|
||||||
'password' => bcrypt(env('DEFAULT_PASSWORD')),
|
'password' => bcrypt(env('DEFAULT_PASSWORD')),
|
||||||
'avatar' => $avatar,
|
|
||||||
'source' => 'cafeg',
|
'source' => 'cafeg',
|
||||||
|
'avatar' => $avatar,
|
||||||
|
|
||||||
'email' => $email,
|
'email' => $email,
|
||||||
]);
|
]);
|
||||||
Auth::guard('member')->login($newUser);
|
Auth::guard('member')->login($newUser);
|
||||||
@ -138,4 +139,39 @@ public function memberNormalLogin(Request $request)
|
|||||||
return redirect()->route('front.login.view')->with('error', '帳號密碼錯誤');
|
return redirect()->route('front.login.view')->with('error', '帳號密碼錯誤');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 重定向到 Google
|
||||||
|
public function redirectToGoogle()
|
||||||
|
{
|
||||||
|
return Socialite::driver('google')->redirect();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 處理 Google 回調
|
||||||
|
public function handleGoogleCallback()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$googleUser = Socialite::driver('google')->stateless()->user();
|
||||||
|
|
||||||
|
// 查找或創建用戶
|
||||||
|
$user = Member::firstOrCreate(
|
||||||
|
['email' => $googleUser->getEmail()],
|
||||||
|
[
|
||||||
|
'name' => $googleUser->getName(),
|
||||||
|
'google_id' => $googleUser->getId(),
|
||||||
|
'avatar' => $googleUser->getAvatar(),
|
||||||
|
'password' => bcrypt(env('DEFAULT_PASSWORD')),
|
||||||
|
'source' => 'cafeg',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
\Log::info('google Oauth :', [$user]);
|
||||||
|
|
||||||
|
|
||||||
|
// 登入用戶
|
||||||
|
Auth::guard('member')->login($user, true);
|
||||||
|
|
||||||
|
return redirect()->route('member.index'); // 登入後跳轉的路徑
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return redirect('/')->with('error', '無法進行 Google 登入');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,4 +91,15 @@ public function checkPhone(Request $request)
|
|||||||
return response()->json(['status' => 'success', 'msg' => '該電話號碼可用']);
|
return response()->json(['status' => 'success', 'msg' => '該電話號碼可用']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function checkEmail(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
$user = Member::where('email', $request->email)->first();
|
||||||
|
|
||||||
|
if ($user) {
|
||||||
|
return response()->json(['status' => 'error', 'msg' => '該email已被其他帳戶使用']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json(['status' => 'success', 'msg' => '該email號碼可用']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,8 @@
|
|||||||
use Exception;
|
use Exception;
|
||||||
use App\Models\EmailVerifications;
|
use App\Models\EmailVerifications;
|
||||||
use Mail;
|
use Mail;
|
||||||
|
use Log;
|
||||||
|
use Auth;
|
||||||
class RegisterController extends Controller
|
class RegisterController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -45,7 +46,13 @@ public function create(Request $request)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Summary of forgotPassword 設定密碼頁面
|
||||||
|
* @param mixed $id
|
||||||
|
* @param mixed $token
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
public function forgotPassword(Request $request)
|
public function forgotPassword(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -57,13 +64,13 @@ public function sendForgotPassword(Request $request)
|
|||||||
\Log::info('sendForgotPassword', []);
|
\Log::info('sendForgotPassword', []);
|
||||||
$subject = "卡菲姬系統-密碼重新設定";
|
$subject = "卡菲姬系統-密碼重新設定";
|
||||||
$token = \Str::random(32);
|
$token = \Str::random(32);
|
||||||
$result = Member::where('email', $request->email)->first();
|
$result = Member::where('email', $request->email)->firstOrFail();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!isset($result)) {
|
if (!isset($result)) {
|
||||||
throw new Exception("找不到帳號", 404);
|
throw new Exception("找不到帳號", 404);
|
||||||
} else {
|
} else {
|
||||||
$verificationLink = route('reset.password.token', ['token' => $token, 'id' => $result->id]);
|
$verificationLink = route('change.password', ['token' => $token, 'id' => $result->id]);
|
||||||
|
|
||||||
\Log::info('sendForgotPassword go EmailVerifications', []);
|
\Log::info('sendForgotPassword go EmailVerifications', []);
|
||||||
$res = EmailVerifications::where('email', $request->email)->first();
|
$res = EmailVerifications::where('email', $request->email)->first();
|
||||||
@ -128,24 +135,44 @@ public function resetPassword(Request $request)
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Summary of changePassword view
|
||||||
|
* @param $id
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
public function changePassword(Request $request)
|
public function changePassword(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
return view('front.auth.confirmpassword');
|
Log::info('request on changePassword : ', $request->all());
|
||||||
|
|
||||||
|
return view('front.auth.confirmpassword', ['id' => $request->id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function confrimPassword(Request $request)
|
|
||||||
|
/**
|
||||||
|
* Summary of resetPasswordProcess
|
||||||
|
* @param mixed $id
|
||||||
|
* @method put
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function resetPasswordProcess(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if ($request->has('id')) {
|
||||||
|
$member = Member::where('id', $request->id)->first();
|
||||||
|
$member->password = bcrypt($request->password);
|
||||||
|
$member->save();
|
||||||
|
if ($member) {
|
||||||
|
EmailVerifications::where('email', $member->email)->delete();
|
||||||
|
}
|
||||||
|
|
||||||
return view('front.auth.confirmpassword');
|
Auth::guard('member')->login($member);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function resetPasswordProcess($id, Request $request)
|
return redirect()->route('member.index');
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +181,7 @@ public function resetPasswordProcess($id, Request $request)
|
|||||||
*/
|
*/
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -34,10 +34,18 @@
|
|||||||
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
'line' => [
|
'line' => [
|
||||||
'client_id' => env('LINE_CLIENT_ID'),
|
'client_id' => env('LINE_CLIENT_ID'),
|
||||||
'client_secret' => env('LINE_CLIENT_SECRET'),
|
'client_secret' => env('LINE_CLIENT_SECRET'),
|
||||||
'redirect' => env('LINE_REDIRECT_URI'),
|
'redirect' => env('LINE_REDIRECT_URI'),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'google' => [
|
||||||
|
'client_id' => env('GOOGLE_CLIENT_ID'),
|
||||||
|
'client_secret' => env('GOOGLE_CLIENT_SECRET'),
|
||||||
|
'redirect' => env('GOOGLE_REDIRECT_URI'),
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@ -115,7 +115,7 @@ class="input-group-text cursor-pointer"
|
|||||||
class="form-control"
|
class="form-control"
|
||||||
placeholder="確認密碼"
|
placeholder="確認密碼"
|
||||||
aria-label="確認密碼"
|
aria-label="確認密碼"
|
||||||
value="{{$data->password ?? ''}}"
|
value=" "
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<label for="formValidationConfirmPass">確認密碼</label>
|
<label for="formValidationConfirmPass">確認密碼</label>
|
||||||
@ -218,7 +218,7 @@ class="btn btn-outline-secondary"
|
|||||||
<!-- Include Scripts -->
|
<!-- Include Scripts -->
|
||||||
<!-- $isFront is used to append the front layout scripts only on the front layout otherwise the variable will be blank -->
|
<!-- $isFront is used to append the front layout scripts only on the front layout otherwise the variable will be blank -->
|
||||||
<!-- BEGIN: Vendor JS-->
|
<!-- BEGIN: Vendor JS-->
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/jquery/jquery.js" />
|
{{-- <link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/jquery/jquery.js" /> --}}
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/helpers.js" />
|
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/helpers.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/popper/popper.js" />
|
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/popper/popper.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/bootstrap.js" />
|
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/bootstrap.js" />
|
||||||
|
|||||||
@ -105,6 +105,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span class="input-group-text cursor-pointer"><i class="ri-eye-off-line"></i></span>
|
<span class="input-group-text cursor-pointer"><i class="ri-eye-off-line"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
<input type="hidden" name="id" value="{{ $id }}">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-5 form-password-toggle">
|
<div class="mb-5 form-password-toggle">
|
||||||
<div class="input-group input-group-merge">
|
<div class="input-group input-group-merge">
|
||||||
|
|||||||
@ -184,7 +184,18 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('email confirm');
|
// 顯示 Loading 畫面
|
||||||
|
Swal.fire({
|
||||||
|
title: '請稍候',
|
||||||
|
text: '正在處理中...',
|
||||||
|
icon: 'info',
|
||||||
|
allowOutsideClick: false, // 防止用戶關閉
|
||||||
|
showConfirmButton: false, // 隱藏按鈕
|
||||||
|
didOpen: () => {
|
||||||
|
Swal.showLoading(); // 顯示 loading 動畫
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
url: "{{ route('email.password.post') }}",
|
url: "{{ route('email.password.post') }}",
|
||||||
@ -196,7 +207,8 @@
|
|||||||
},
|
},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log('Server response:', response);
|
Swal.close(); // 隱藏 Loading 畫面
|
||||||
|
|
||||||
if (response.status == 'success') {
|
if (response.status == 'success') {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: '成功',
|
title: '成功',
|
||||||
@ -214,14 +226,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
console.log('Error:', error);
|
Swal.close(); // 隱藏 Loading 畫面
|
||||||
|
|
||||||
|
if (xhr.status == 404) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: '錯誤',
|
title: '錯誤',
|
||||||
text: "系統錯誤,請稍後再試",
|
text: "未找到有效帳號",
|
||||||
|
icon: 'error',
|
||||||
|
confirmButtonText: '确定'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: '錯誤',
|
||||||
|
text: "伺服器發生錯誤,請稍後再試",
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
confirmButtonText: '确定'
|
confirmButtonText: '确定'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -172,11 +172,9 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="{{route('google.auth')}}" class="btn btn-icon rounded-circle btn-text-google-plus">
|
||||||
|
|
||||||
{{-- <a href="javascript:;" class="btn btn-icon rounded-circle btn-text-google-plus">
|
|
||||||
<i class="tf-icons ri-google-fill"></i>
|
<i class="tf-icons ri-google-fill"></i>
|
||||||
</a> --}}
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -123,7 +123,7 @@
|
|||||||
<div class="form-floating form-floating-outline mb-5">
|
<div class="form-floating form-floating-outline mb-5">
|
||||||
<input type="email" class="form-control" id="email" name="email" placeholder="輸入你的帳號" required>
|
<input type="email" class="form-control" id="email" name="email" placeholder="輸入你的帳號" required>
|
||||||
<label for="email">Email(帳號)</label>
|
<label for="email">Email(帳號)</label>
|
||||||
<div class="invalid-feedback">請輸入有效的 Email 地址。</div>
|
<div class="invalid-feedback" id = "checkemail">請輸入有效的 Email 地址。</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-5 form-password-toggle">
|
<div class="mb-5 form-password-toggle">
|
||||||
<div class="input-group input-group-merge">
|
<div class="input-group input-group-merge">
|
||||||
@ -317,6 +317,44 @@ function validatePhoneField(field) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function validateEmailField(field) {
|
||||||
|
const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||||
|
const value = field.val().trim();
|
||||||
|
|
||||||
|
// 驗證格式
|
||||||
|
if (!emailPattern.test(value)) {
|
||||||
|
field.addClass('is-invalid');
|
||||||
|
$("#checkphone").text('請輸入有效的 10 位手機號碼。').show();
|
||||||
|
return Promise.resolve(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 檢查手機號是否已被註冊
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
$.ajax({
|
||||||
|
url: "{{ route('member.checkemail') }}",
|
||||||
|
method: 'GET',
|
||||||
|
data: {
|
||||||
|
email: value
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
if (response.status === 'error') {
|
||||||
|
field.addClass('is-invalid');
|
||||||
|
$("#checkemail").text(response.msg).show(); // 顯示伺服器返回的錯誤訊息
|
||||||
|
resolve(false);
|
||||||
|
} else {
|
||||||
|
field.removeClass('is-invalid');
|
||||||
|
$("#checkemail").hide(); // 隱藏錯誤訊息
|
||||||
|
resolve(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
field.addClass('is-invalid');
|
||||||
|
$("#checkphone").text('檢查手機號時發生錯誤,請稍後再試。').show();
|
||||||
|
resolve(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 綁定每個欄位的失焦事件
|
// 綁定每個欄位的失焦事件
|
||||||
$('#formAuthentication input').on('blur', function() {
|
$('#formAuthentication input').on('blur', function() {
|
||||||
@ -325,6 +363,11 @@ function validatePhoneField(field) {
|
|||||||
} else {
|
} else {
|
||||||
validateField($(this));
|
validateField($(this));
|
||||||
}
|
}
|
||||||
|
if ($(this).attr('id') === 'email') {
|
||||||
|
validateEmailField($(this));
|
||||||
|
} else {
|
||||||
|
validateField($(this));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 表單提交事件
|
// 表單提交事件
|
||||||
|
|||||||
@ -77,7 +77,7 @@
|
|||||||
<h5 class="card-header">兌換編碼</h5>
|
<h5 class="card-header">兌換編碼</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="form-floating form-floating-outline">
|
<div class="form-floating form-floating-outline">
|
||||||
<input type="text" class="form-control" id="floatingInput" aria-describedby="floatingInputHelp">
|
<input type="text" class="form-control text-danger" style="font-size:24px; font-weight: bold;" id="floatingInput" aria-describedby="floatingInputHelp">
|
||||||
<label for="floatingInput">兌換碼</label>
|
<label for="floatingInput">兌換碼</label>
|
||||||
{{-- <div id="floatingInputHelp" class="form-text">We'll never share your details with anyone else.</div> --}}
|
{{-- <div id="floatingInputHelp" class="form-text">We'll never share your details with anyone else.</div> --}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -13,12 +13,14 @@
|
|||||||
<div class="app-brand justify-content-center mt-5">
|
<div class="app-brand justify-content-center mt-5">
|
||||||
<a href="#" class="app-brand-link gap-2">
|
<a href="#" class="app-brand-link gap-2">
|
||||||
<span class="app-brand-logo demo"><span>
|
<span class="app-brand-logo demo"><span>
|
||||||
<img src="{{asset('assets/img/logo/cafeg-logo.png')}}" width="50px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
<img src="{{ asset('assets/img/logo/cafeg-logo.png') }}" width="50px" height="50px"
|
||||||
|
alt="{{ asset('img/logo/cafeg-logo.png') }}"> </img>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="app-brand-text demo text-heading fw-semibold">
|
<span class="app-brand-text demo text-heading fw-semibold">
|
||||||
<img src="{{asset('assets/img/logo/cafeg-logo-h.png')}}" width="120px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
<img src="{{ asset('assets/img/logo/cafeg-logo-h.png') }}" width="120px"
|
||||||
|
height="50px" alt="{{ asset('img/logo/cafeg-logo.png') }}"> </img>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
@ -33,7 +35,6 @@
|
|||||||
<div class="card-body mt-1">
|
<div class="card-body mt-1">
|
||||||
<h4 class="mb-1">卡菲姬個人資料</h4>
|
<h4 class="mb-1">卡菲姬個人資料</h4>
|
||||||
<p class="mb-5">Hi, <span class="text-ifno"> {{ $data->name }} 用戶 </span> 歡迎你 ! ,請花幾分鐘完善資料</p>
|
<p class="mb-5">Hi, <span class="text-ifno"> {{ $data->name }} 用戶 </span> 歡迎你 ! ,請花幾分鐘完善資料</p>
|
||||||
|
|
||||||
<div class="card" id="editUser">
|
<div class="card" id="editUser">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="body p-0">
|
<div class="body p-0">
|
||||||
@ -45,7 +46,9 @@
|
|||||||
<!-- 暱稱 -->
|
<!-- 暱稱 -->
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="form-floating form-floating-outline">
|
<div class="form-floating form-floating-outline">
|
||||||
<input readonly type="text" id="modalEditUserFirstName" name="modalEditUserFirstName" class="form-control" value="{{$data->name}}" placeholder="暱稱" aria-label="暱稱" />
|
<input readonly type="text" id="modalEditUserFirstName"
|
||||||
|
name="modalEditUserFirstName" class="form-control"
|
||||||
|
value="{{ $data->name }}" placeholder="暱稱" aria-label="暱稱" />
|
||||||
<label for="modalEditUserFirstName">暱稱 </label>
|
<label for="modalEditUserFirstName">暱稱 </label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -53,7 +56,9 @@
|
|||||||
<!-- Email -->
|
<!-- Email -->
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="form-floating form-floating-outline">
|
<div class="form-floating form-floating-outline">
|
||||||
<input type="email" id="formValidationEmail" class="form-control" placeholder="john.doe@example.com" aria-label="Email" required value="{{$data->email ?? ''}}" />
|
<input type="email" id="formValidationEmail" class="form-control"
|
||||||
|
placeholder="john.doe@example.com" aria-label="Email" required
|
||||||
|
value="{{ $data->email ?? '' }}" @if(isset($data->email)) readonly @endif />
|
||||||
<label for="formValidationEmail">Email</label>
|
<label for="formValidationEmail">Email</label>
|
||||||
<div class="invalid-feedback">請輸入有效的 Email</div>
|
<div class="invalid-feedback">請輸入有效的 Email</div>
|
||||||
</div>
|
</div>
|
||||||
@ -64,12 +69,15 @@
|
|||||||
<div class="form-password-toggle">
|
<div class="form-password-toggle">
|
||||||
<div class="input-group input-group-merge">
|
<div class="input-group input-group-merge">
|
||||||
<div class="form-floating form-floating-outline">
|
<div class="form-floating form-floating-outline">
|
||||||
<input type="password" id="basic-default-password" class="form-control" placeholder="密碼" aria-label="密碼" value="{{$data->password ?? ''}}" />
|
<input type="password" id="basic-default-password"
|
||||||
|
class="form-control" placeholder="密碼" aria-label="密碼"
|
||||||
|
value="" />
|
||||||
<label for="basic-default-password">密碼</label>
|
<label for="basic-default-password">密碼</label>
|
||||||
<div class="invalid-feedback">請輸入有效密碼</div>
|
<div class="invalid-feedback">請輸入有效密碼</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<span class="input-group-text cursor-pointer" id="basic-default-password3">
|
<span class="input-group-text cursor-pointer"
|
||||||
|
id="basic-default-password3">
|
||||||
<i class="ri-eye-off-line"></i>
|
<i class="ri-eye-off-line"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -82,12 +90,15 @@
|
|||||||
<div class="form-password-toggle">
|
<div class="form-password-toggle">
|
||||||
<div class="input-group input-group-merge">
|
<div class="input-group input-group-merge">
|
||||||
<div class="form-floating form-floating-outline">
|
<div class="form-floating form-floating-outline">
|
||||||
<input type="password" id="formValidationConfirmPass" name="formValidationConfirmPass" class="form-control" placeholder="確認密碼" aria-label="確認密碼" value="{{$data->password ?? ''}}" />
|
<input type="password" id="formValidationConfirmPass"
|
||||||
|
name="formValidationConfirmPass" class="form-control"
|
||||||
|
placeholder="確認密碼" aria-label="確認密碼" value="" />
|
||||||
<label for="formValidationConfirmPass">確認密碼</label>
|
<label for="formValidationConfirmPass">確認密碼</label>
|
||||||
<div class="invalid-feedback">密碼與確認密碼不相符</div>
|
<div class="invalid-feedback">密碼與確認密碼不相符</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<span class="input-group-text cursor-pointer" id="multicol-confirm-password2">
|
<span class="input-group-text cursor-pointer"
|
||||||
|
id="multicol-confirm-password2">
|
||||||
<i class="ri-eye-off-line"></i>
|
<i class="ri-eye-off-line"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -99,7 +110,9 @@
|
|||||||
<div class="input-group input-group-merge">
|
<div class="input-group input-group-merge">
|
||||||
|
|
||||||
<div class="form-floating form-floating-outline">
|
<div class="form-floating form-floating-outline">
|
||||||
<input type="text" id="modalEditUserPhone" name="modalEditUserPhone" class="form-control phone-number-mask" value="{{$data->phone ?? ''}}" placeholder="0920111222" aria-label="電話" />
|
<input type="text" id="modalEditUserPhone" name="modalEditUserPhone"
|
||||||
|
class="form-control phone-number-mask" value="{{ $data->phone }}"
|
||||||
|
placeholder="0920111222" aria-label="電話" />
|
||||||
<label for="modalEditUserPhone">電話</label>
|
<label for="modalEditUserPhone">電話</label>
|
||||||
<div class="invalid-feedback">請輸入有效電話</div>
|
<div class="invalid-feedback">請輸入有效電話</div>
|
||||||
|
|
||||||
@ -109,9 +122,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 按鈕 -->
|
<!-- 按鈕 -->
|
||||||
<div class="col-12 text-center d-flex flex-wrap justify-content-center gap-4 row-gap-4">
|
<div
|
||||||
|
class="col-12 text-center d-flex flex-wrap justify-content-center gap-4 row-gap-4">
|
||||||
<button type="submit" class="btn btn-primary">送出</button>
|
<button type="submit" class="btn btn-primary">送出</button>
|
||||||
<button id='cancel' type="reset" class="btn btn-outline-secondary" data-bs-dismiss="modal" aria-label="Close">
|
<button id='cancel' type="button" class="btn btn-outline-secondary"
|
||||||
|
data-bs-dismiss="modal" aria-label="Close">
|
||||||
取消
|
取消
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -141,37 +156,41 @@
|
|||||||
<!-- Include Scripts -->
|
<!-- Include Scripts -->
|
||||||
<!-- $isFront is used to append the front layout scripts only on the front layout otherwise the variable will be blank -->
|
<!-- $isFront is used to append the front layout scripts only on the front layout otherwise the variable will be blank -->
|
||||||
<!-- BEGIN: Vendor JS-->
|
<!-- BEGIN: Vendor JS-->
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/jquery/jquery.js" />
|
@section('scripts')
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/helpers.js" />
|
<!-- Core JS -->
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/popper/popper.js" />
|
<!-- build:js assets/vendor/js/core.js -->
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/bootstrap.js" />
|
<script src="{{ asset('assets') }}/vendor/libs/jquery/jquery.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/node-waves/node-waves.js" />
|
<script src="{{ asset('assets') }}/vendor/libs/popper/popper.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/perfect-scrollbar/perfect-scrollbar.js" />
|
<script src="{{ asset('assets') }}/vendor/js/bootstrap.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/hammer/hammer.js" />
|
<script src="{{ asset('assets') }}/vendor/libs/node-waves/node-waves.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/typeahead-js/typeahead.js" />
|
<script src="{{ asset('assets') }}/vendor/libs/perfect-scrollbar/perfect-scrollbar.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/menu.js" />
|
<script src="{{ asset('assets') }}/vendor/libs/hammer/hammer.js"></script>
|
||||||
<script type="module" src="{{asset('assets')}}/vendor/libs/jquery/jquery.js"></script>
|
<script src="{{ asset('assets') }}/vendor/libs/i18n/i18n.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/@form-validation/popular.js" />
|
<script src="{{ asset('assets') }}/vendor/libs/typeahead-js/typeahead.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/helpers.js" />
|
<script src="{{ asset('assets') }}/vendor/js/menu.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/@form-validation/bootstrap5.js" />
|
|
||||||
{{-- <link rel="modulepreload" href="{{asset('assets')}}/index.js" /> --}}
|
<!-- endbuild -->
|
||||||
{{-- <link rel="modulepreload" href="{{asset('assets')}}/auto.js" /> --}}
|
|
||||||
<script type="module" src="{{asset('assets')}}/vendor/libs/@form-validation/popular.js">
|
<!-- Vendors JS -->
|
||||||
</script>
|
<script src="{{ asset('assets') }}/vendor/libs/select2/select2.js"></script>
|
||||||
<script type="module" src="{{asset('assets')}}/vendor/libs/@form-validation/bootstrap5.js"></script>
|
<script src="{{ asset('assets') }}/vendor/libs/bootstrap-select/bootstrap-select.js"></script>
|
||||||
<script type="module" src="{{asset('assets')}}/vendor/libs/@form-validation/auto-focus.js"></script>
|
<script src="{{ asset('assets') }}/vendor/libs/moment/moment.js"></script>
|
||||||
<!-- END: Page Vendor JS-->
|
<script src="{{ asset('assets') }}/vendor/libs/flatpickr/flatpickr.js"></script>
|
||||||
<!-- BEGIN: Theme JS-->
|
<script src="{{ asset('assets') }}/vendor/libs/tagify/tagify.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/js/main.js" />
|
<script src="{{ asset('assets') }}/vendor/libs/@form-validation/popular.js"></script>
|
||||||
<script type="module" src="{{asset('assets')}}/js/main.js"></script>
|
<script src="{{ asset('assets') }}/vendor/libs/@form-validation/bootstrap5.js"></script>
|
||||||
<!-- END: Theme JS-->
|
<script src="{{ asset('assets') }}/vendor/libs/@form-validation/auto-focus.js"></script>
|
||||||
<!-- Pricing Modal JS-->
|
|
||||||
<!-- END: Pricing Modal JS-->
|
<!-- Main JS -->
|
||||||
<!-- BEGIN: Page JS-->
|
<script src="../../assets/js/main.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/js/pages-auth.js" />
|
|
||||||
<script type="module" src="{{asset('assets')}}/js/pages-auth.js"></script>
|
|
||||||
<!-- END: Page JS-->
|
|
||||||
<script src="{{asset('assets')}}/js/form-validation.js"></script>
|
|
||||||
|
<!-- Page JS -->
|
||||||
|
<script src="../../assets/js/form-validation.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
@ -184,9 +203,9 @@
|
|||||||
// 簡單的電子郵件格式驗證(可選)
|
// 簡單的電子郵件格式驗證(可選)
|
||||||
if (!email.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)) {
|
if (!email.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error'
|
icon: 'error',
|
||||||
, title: '格式錯誤'
|
title: '格式錯誤',
|
||||||
, text: '請輸入有效的電子郵件地址!'
|
text: '請輸入有效的電子郵件地址!'
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -197,50 +216,52 @@
|
|||||||
type: 'get', // 或 'GET',根據你的需求
|
type: 'get', // 或 'GET',根據你的需求
|
||||||
data: {
|
data: {
|
||||||
email: email
|
email: email
|
||||||
}
|
},
|
||||||
, headers: {
|
headers: {
|
||||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') // 如果使用 Laravel CSRF 保護
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr(
|
||||||
}
|
'content') // 如果使用 Laravel CSRF 保護
|
||||||
, success: function(response) {
|
},
|
||||||
|
success: function(response) {
|
||||||
// 如果電子郵件已被註冊
|
// 如果電子郵件已被註冊
|
||||||
if (!response.valid) {
|
if (!response.valid) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'warning'
|
icon: 'warning',
|
||||||
, title: '電子郵件已被註冊'
|
title: '電子郵件已被註冊',
|
||||||
, text: '該電子郵件已存在,請選擇下一步操作。'
|
text: '該電子郵件已存在,請選擇下一步操作。',
|
||||||
, showCancelButton: true
|
showCancelButton: true,
|
||||||
, confirmButtonText: '驗證電子郵件'
|
confirmButtonText: '驗證電子郵件',
|
||||||
, cancelButtonText: '我知道了,換一個'
|
cancelButtonText: '我知道了,換一個',
|
||||||
, reverseButtons: true // 按鈕排列反向
|
reverseButtons: true // 按鈕排列反向
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
// 使用者選擇驗證電子郵件
|
// 使用者選擇驗證電子郵件
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'info'
|
icon: 'info',
|
||||||
, title: '驗證發送中'
|
title: '驗證發送中',
|
||||||
, text: '已向該電子郵件發送驗證信,請檢查郵箱。'
|
text: '已向該電子郵件發送驗證信,請檢查郵箱。'
|
||||||
});
|
});
|
||||||
// 可在此處調用發送驗證郵件的函式
|
// 可在此處調用發送驗證郵件的函式
|
||||||
sendVerificationEmail(email);
|
sendVerificationEmail(email);
|
||||||
} else if (result.dismiss === Swal.DismissReason.cancel) {
|
} else if (result.dismiss === Swal.DismissReason
|
||||||
|
.cancel) {
|
||||||
// 使用者選擇換一個電子郵件
|
// 使用者選擇換一個電子郵件
|
||||||
$('#formValidationEmail').val(''); // 清空輸入框
|
$('#formValidationEmail').val(''); // 清空輸入框
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success'
|
icon: 'success',
|
||||||
, title: '電子郵件可用'
|
title: '電子郵件可用',
|
||||||
, text: '您可以繼續使用此電子郵件。'
|
text: '您可以繼續使用此電子郵件。'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
, error: function(xhr) {
|
error: function(xhr) {
|
||||||
// 錯誤處理
|
// 錯誤處理
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error'
|
icon: 'error',
|
||||||
, title: '伺服器錯誤'
|
title: '伺服器錯誤',
|
||||||
, text: '驗證失敗,請稍後再試!'
|
text: '驗證失敗,請稍後再試!'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -250,30 +271,30 @@ function sendVerificationEmail(email) {
|
|||||||
console.log('email:', email);
|
console.log('email:', email);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{{ route('member.sendemail') }}", // 替換為發送驗證郵件的 API
|
url: "{{ route('member.sendemail') }}", // 替換為發送驗證郵件的 API
|
||||||
type: 'POST'
|
type: 'POST',
|
||||||
, data: {
|
data: {
|
||||||
email: email
|
email: email
|
||||||
}
|
},
|
||||||
, headers: {
|
headers: {
|
||||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||||
}
|
},
|
||||||
, success: function(Response) {
|
success: function(Response) {
|
||||||
console.log('Response:', Response);
|
console.log('Response:', Response);
|
||||||
|
|
||||||
if (Response.status == 'success') {
|
if (Response.status == 'success') {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success'
|
icon: 'success',
|
||||||
, title: '驗證信已發送'
|
title: '驗證信已發送',
|
||||||
, text: '請檢查您的電子郵件以完成驗證。'
|
text: '請檢查您的電子郵件以完成驗證。'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
},
|
||||||
, error: function() {
|
error: function() {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error'
|
icon: 'error',
|
||||||
, title: '驗證信發送失敗'
|
title: '驗證信發送失敗',
|
||||||
, text: '請稍後再試!'
|
text: '請稍後再試!'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -326,42 +347,43 @@ function sendVerificationEmail(email) {
|
|||||||
// 若通過所有驗證,發送 AJAX 請求
|
// 若通過所有驗證,發送 AJAX 請求
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const formData = {
|
const formData = {
|
||||||
email: emailInput.val()
|
email: emailInput.val(),
|
||||||
, password: passwordInput.val()
|
password: passwordInput.val(),
|
||||||
, phone: phoneInput.val()
|
phone: phoneInput.val(),
|
||||||
, };
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{{ route('member.profile.update') }}"
|
url: "{{ route('member.profile.update') }}",
|
||||||
, type: 'put'
|
type: 'put',
|
||||||
, data: formData
|
data: formData,
|
||||||
, headers: {
|
headers: {
|
||||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||||
}
|
},
|
||||||
, success: function(response) {
|
success: function(response) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: '成功'
|
title: '成功',
|
||||||
, text: "{{ session('success') }}"
|
text: "{{ session('success') }}",
|
||||||
, icon: 'success'
|
icon: 'success',
|
||||||
, confirmButtonText: '确定'
|
confirmButtonText: '确定'
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
// 跳轉到 member.index 路由
|
// 跳轉到 member.index 路由
|
||||||
window.location.href = "{{ route('member.index') }}";
|
window.location.href =
|
||||||
|
"{{ route('member.index') }}";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
},
|
||||||
, error: function(error) {
|
error: function(error) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: '失敗'
|
title: '失敗',
|
||||||
, text: "更新失敗"
|
text: "更新失敗",
|
||||||
, icon: 'error'
|
icon: 'error',
|
||||||
, confirmButtonText: '确定'
|
confirmButtonText: '确定'
|
||||||
|
});
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
|
||||||
, });
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -383,9 +405,16 @@ function sendVerificationEmail(email) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
|
||||||
|
<link rel="module" href="{{ asset('assets') }}/vendor/libs/@form-validation/popular.js" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$("#cancel").on('click', function() {
|
||||||
|
|
||||||
|
window.location.href = "{{ route('member.index') }}";
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@ -90,22 +90,20 @@
|
|||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="flex-shrink-0 me-2">
|
<div class="flex-shrink-0 me-2">
|
||||||
<div class="avatar avatar-online">
|
<div class="avatar avatar-online">
|
||||||
|
@if(isset(Auth::guard('member')->user()->avatar))
|
||||||
|
<img src="{{ Auth::guard('member')->user()->avatar }}" alt class="rounded-circle" />
|
||||||
|
@else
|
||||||
<img src="../../assets/img/avatars/1.png" alt class="rounded-circle" />
|
<img src="../../assets/img/avatars/1.png" alt class="rounded-circle" />
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1">
|
||||||
<span class="fw-medium d-block small">
|
<span class="fw-medium d-block small">
|
||||||
@if (Auth::guard('member')->check())
|
|
||||||
{{Auth::guard('member')->user()->name}}
|
{{Auth::guard('member')->user()->name}}
|
||||||
@else
|
|
||||||
{{Auth::user()->name}}
|
|
||||||
@endif
|
|
||||||
</span>
|
</span>
|
||||||
@if(Auth::guard('member')->check())
|
|
||||||
<small class="text-muted">{{Auth::guard('member')->user()->Level_Name}}</small>
|
<small class="text-muted">{{Auth::guard('member')->user()->Level_Name}}</small>
|
||||||
@else
|
|
||||||
<small class="text-muted">管理員</small>
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@ -150,19 +148,12 @@ class="align-middle">Pricing</span>
|
|||||||
<li>
|
<li>
|
||||||
<div class="d-grid px-4 pt-2 pb-1">
|
<div class="d-grid px-4 pt-2 pb-1">
|
||||||
|
|
||||||
@if (Auth::guard('member')->check())
|
|
||||||
<a class="btn btn-sm btn-danger d-flex" href="{{route("member.logout")}}" target="_blank">
|
<a class="btn btn-sm btn-danger d-flex" href="{{route("member.logout")}}" target="_blank">
|
||||||
<small class="align-middle">登 出</small>
|
<small class="align-middle">登 出</small>
|
||||||
<i class="ri-logout-box-r-line ms-2 ri-16px"></i>
|
<i class="ri-logout-box-r-line ms-2 ri-16px"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@else
|
|
||||||
<a class="btn btn-sm btn-danger d-flex" href="{{route("admin.logout")}}" target="_blank">
|
|
||||||
<small class="align-middle">登 出</small>
|
|
||||||
<i class="ri-logout-box-r-line ms-2 ri-16px"></i>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -40,10 +40,14 @@
|
|||||||
Route::get('email/password', [RegisterController::class, 'forgotPassword'])->name('email.password');
|
Route::get('email/password', [RegisterController::class, 'forgotPassword'])->name('email.password');
|
||||||
Route::post('email/password', [RegisterController::class, 'sendForgotPassword'])->name('email.password.post');
|
Route::post('email/password', [RegisterController::class, 'sendForgotPassword'])->name('email.password.post');
|
||||||
Route::get('resetpassword', [RegisterController::class, 'resetPassword'])->name('reset.password.token');
|
Route::get('resetpassword', [RegisterController::class, 'resetPassword'])->name('reset.password.token');
|
||||||
Route::get('changepassword/{id}', [RegisterController::class, 'changePassword'])->name('change.password');
|
Route::get('changepassword', [RegisterController::class, 'changePassword'])->name('change.password');
|
||||||
Route::put('changepassword/{id}', [RegisterController::class, 'resetPasswordProcess'])->name('change.password.put');
|
Route::put('changepassword', [RegisterController::class, 'resetPasswordProcess'])->name('change.password.put');
|
||||||
|
|
||||||
Route::any('checkphone', [MemberController::class, 'checkPhone'])->name('member.checkphone');
|
Route::any('checkphone', [MemberController::class, 'checkPhone'])->name('member.checkphone');
|
||||||
|
Route::get('checkemail', [MemberController::class, 'checkEmail'])->name('member.checkemail');
|
||||||
|
Route::get('google/auth', [LoginController::class, 'redirectToGoogle'])->name('google.auth');
|
||||||
|
Route::get('google/callback', [LoginController::class, 'handleGoogleCallback'])->name('google.redirect');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//前台route 登入後;
|
//前台route 登入後;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user