add record password di web n customer contr

This commit is contained in:
Ain Izazi
2024-12-26 08:52:17 +08:00
parent 44f632638b
commit 630b606520
2 changed files with 67 additions and 49 deletions
@@ -2,6 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Audit;
use App\Marhun; use App\Marhun;
use App\BankMaster; use App\BankMaster;
use App\Customer; use App\Customer;
@@ -845,4 +846,18 @@ class CustomerController extends Controller
return response()->json($customer); return response()->json($customer);
} }
public function changepassword(Request $request, $kodcaw, $id) {
$current = Carbon::now();
// log::info ($request->name);
$audit = new Audit();
$audit->users = $request->nama;
$audit->actions = "Tukar Kata Laluan";
// $audit->new_data = json_encode($request->new_password);
$audit->kodcaw = $kodcaw;
$audit->created_at = $current;
$audit->updated_at = $current;
$audit->save();
}
} }
+3
View File
@@ -61,6 +61,9 @@ $router->group(['prefix'=>'api'], function () use ($router){
$router->get('customer/blacklist',['uses'=>'CustomerController@blacklistCustomer']); $router->get('customer/blacklist',['uses'=>'CustomerController@blacklistCustomer']);
$router->get('customer/eachcawangan/{ic}',['uses'=>'CustomerController@showCustomerByEachCawangan']); $router->get('customer/eachcawangan/{ic}',['uses'=>'CustomerController@showCustomerByEachCawangan']);
//Change Password
$router->post('changepassword/{kodcaw}/{id}',['uses'=>'CustomerController@changepassword']);
//Gadai API //Gadai API
$router->get('gadai',['uses'=>'GadaiController@showAllGadais']); $router->get('gadai',['uses'=>'GadaiController@showAllGadais']);
$router->get('gadai/{noic}',['uses'=>'GadaiController@showOneGadai']); $router->get('gadai/{noic}',['uses'=>'GadaiController@showOneGadai']);