<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class AuthorizationController extends Controller
{
public function showGoogle2FAForm()
{
$page_title = __("admin.page.google.2fa.verification");
return view('admin.auth.authorize.verify-google-2fa',compact('page_title'));
}
public function google2FASubmit(Request $request) {
$request->validate([
'code' => "required|string",
]);
$code = $request->code;
$user = auth()->user();
if(!$user->two_factor_secret) {
return back()->with(['warning' => [__("Your secret key not stored properly. Please contact with system administrator")]]);
}
if(google_2fa_verify($user->two_factor_secret,$code)) {
$user->update([
'two_factor_verified' => true,
]);
return redirect()->intended(route('admin.dashboard'));
}
return back()->with(['error' => [__("Invalid code. Please try again")]]);
}
}
How To Payment
Making a payment on our website is quick and secure. Start by logging in or creating an account. Select your preferred payment method, input the required details, and review the information. Once you confirm everything is correct, click on the "Submit Payment" button. You’ll receive instant confirmation and can track your payment status through your account dashboard. It’s an easy and secure process.