diff --git a/app/Http/Middleware/Profile.php b/app/Http/Middleware/Profile.php index c4118e3..431997c 100644 --- a/app/Http/Middleware/Profile.php +++ b/app/Http/Middleware/Profile.php @@ -18,8 +18,8 @@ class Profile */ public function handle(Request $request, Closure $next): Response { - $user = Sekolah::where('npsn',auth()->user()->username)->where('ms_group_id',2)->first(); - if(!@$user->profile && ($user->ms_group_id == 2)){ + $user = Sekolah::where('npsn',auth()->user()->username)->first(); + if(!@$user && (auth()->user()->ms_group_id == 2)){ return redirect('profile-sekolah/lengkapi/'.encode_id($user->username)); } return $next($request);