From 1046d0450f0f164112fe14bebf7a603ab08b9a25 Mon Sep 17 00:00:00 2001 From: Ilham Wara Nugroho Date: Mon, 9 Feb 2026 14:47:11 +0700 Subject: [PATCH] update --- app/Http/Controllers/ProfileController.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 99dfa82..bac917e 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -93,6 +93,26 @@ class ProfileController extends Controller 'user_id' => auth()->user()->id, ]); + $user = User::find(auth()->user()->id); + + $session = [ + 'username' => $user->username, + 'name' => $user->name, + 'email' => $user->email, + 'sekolah_id' => @$user->profile->sekolah->MsSekolahId, + 'npsn' => @$user->profile->npsn, + 'tingkat_sekolah' => @$user->profile->tingkat->name, + 'status_sekolah' => @$user->profile->status_sekolah, + 'alamat_sekolah' => @$user->profile->alamat_sekolah, + 'kontak_person' => @$user->profile->kontak_person, + 'telp' => @$user->profile->telp, + 'currYear' => date('Y'), + 'group_id' => @$user->ms_group_id, + 'group_alias' => @$user->group->alias, + 'group_name' => @$user->group->name, + ]; + session($session); + DB::commit(); return redirect('dashboard');