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)); }