From 186ef438906cfb7daa31a52701a657553d30edd1 Mon Sep 17 00:00:00 2001 From: Ilham Wara Nugroho Date: Mon, 9 Feb 2026 13:58:21 +0700 Subject: [PATCH] update --- app/Http/Middleware/Profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Middleware/Profile.php b/app/Http/Middleware/Profile.php index a5ad8d8..d738cb3 100644 --- a/app/Http/Middleware/Profile.php +++ b/app/Http/Middleware/Profile.php @@ -17,7 +17,7 @@ class Profile */ public function handle(Request $request, Closure $next): Response { - $user = User::with(['profile'])->where('id',auth()->user()->id)->first(); + $user = Sekolah::where('npsn',auth()->user()->username)->where('ms_group_id',2)->first(); if(!@$user->profile && ($user->ms_group_id == 2)){ return redirect('profile-sekolah/lengkapi/'.encode_id($user->username)); }