diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 465c39c..8a93918 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -4,7 +4,8 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\SendsPasswordResetEmails; - +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Password; class ForgotPasswordController extends Controller { /* diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 93a0187..d260c6a 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -113,3 +113,8 @@ class RegisterController extends Controller return view('auth.termasyarat', compact('termasyarat')); } } + + public function forgotemel() + { + return view('auth.forgotemail2'); + } \ No newline at end of file diff --git a/app/Http/Controllers/InformationController.php b/app/Http/Controllers/InformationController.php index 07c4f80..5fcd36a 100644 --- a/app/Http/Controllers/InformationController.php +++ b/app/Http/Controllers/InformationController.php @@ -41,7 +41,8 @@ class InformationController extends Controller if(isset($CustomerInfo['lelong'])){ if(sizeof($CustomerInfo['lelong']) > 0){ foreach($CustomerInfo['lelong'] as $index=>$lelong){ - $array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://adminbid.arrahn.com.my/api/portalApi',['norujukan' => $lelong['norujukan']])->json(); + // $array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://adminbid.arrahn.com.my/api/portalApi',['norujukan' => $lelong['norujukan']])->json(); + $array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://niklah.arrahn.com.my/api/portalApi',['norujukan' => $lelong['norujukan']])->json(); if($array_lelong['lelong'] !== null){ $CustomerInfo['lelong'][$index] = collect($lelong)->merge($array_lelong['lelong'])->toArray(); diff --git a/app/Http/Controllers/TacController.php b/app/Http/Controllers/TacController.php index f226cce..a3e73d0 100644 --- a/app/Http/Controllers/TacController.php +++ b/app/Http/Controllers/TacController.php @@ -27,6 +27,20 @@ class TacController extends Controller } } + public function TACrequestfe(Request $request){ + + $tac = tacportal::where([['icno',$request->icno],['tac_no',$request->tac]])->get()->toArray(); + // dd($tac); + if($tac){ + // dd($request->icno); + $emel = User::where('icno','=', $request->icno)->first()->toArray(); + return response(['status' => 1, 'useremel' => $emel]); + + }else{ + return response(['status' => 0]); + } + } + public function requestKadPengenalan(Request $request){ @@ -67,6 +81,42 @@ class TacController extends Controller } } + public function requestKadPengenalanfe(Request $request){ + + $currentDateTime = Carbon::now(); + + $expiretac = tacportal::where('icno',$request->icno) + ->whereDate('created_at','=',$currentDateTime) + ->whereDate('expired_at','=',$currentDateTime) + ->whereTime('expired_at','>=',$currentDateTime->toTimeString()) + ->whereTime('created_at','<=',$currentDateTime->toTimeString()) + ->latest() + ->first(); + + if($expiretac){ + return response(['notexpired' => true]); + } + + + $CustomerInfo = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/customers/' . $request->icno)->json(); + + if($CustomerInfo) + { + $generatestatus = $this->generateTAC($CustomerInfo); + + if($generatestatus){ + + $backphone = substr($CustomerInfo['telefon'],-4); + return response(['notelefon' => $backphone,'status' => 1]); + }else{ + + } + }else{ + + return response(['status' => 0],200); + } + } + private function generateTAC($customer){ diff --git a/public/assets/img/Spinner14.gif b/public/assets/img/Spinner14.gif new file mode 100644 index 0000000..210a062 Binary files /dev/null and b/public/assets/img/Spinner14.gif differ diff --git a/resources/views/auth/forgotemail2.blade.php b/resources/views/auth/forgotemail2.blade.php new file mode 100644 index 0000000..1b188f6 --- /dev/null +++ b/resources/views/auth/forgotemail2.blade.php @@ -0,0 +1,576 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Lupa Emel | Portal Pelanggan + + + + + + +