pick certain commits

This commit is contained in:
Hafifie PKB
2024-03-06 22:04:19 +08:00
parent e6cc3613bf
commit de32f6b13d
8 changed files with 2452 additions and 1424 deletions
+4 -1
View File
@@ -32,11 +32,11 @@ class HomeController extends Controller
$current = Carbon::now();
$current = new Carbon();
$current = $current->toDateString();
$auth_user = Auth::user();
$api_url = config('api.url');
$check_nokp = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/checknokp/' . $auth_user['cawangan'] . '/' . $auth_user['no_kp'] . '/' . $current) ->json();
// dd($check_nokp, $auth_user['no_kp']);
if($check_nokp == $auth_user['no_kp']){
@@ -87,10 +87,13 @@ class HomeController extends Controller
else{
$session = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/logsession/' . $auth_user['cawangan'], [
'id' => $auth_user['id'],
'nama' => $auth_user['name'],
'nokp' => $auth_user['no_kp'],
'email' => $auth_user['email'],
'taraf' => $auth_user['role_harian'],
'tarikh' => $current,
]);