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)); } return $next($request); } }