File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
app/Http/Controllers/JwtAuth Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,11 @@ public function logout(Request $request){
274274
275275 auth ()->logout (true , true );
276276
277- return response ([], 200 );
277+ if ($ request ->ajax () || $ request ->wantsJson ()){
278+ response ([], 200 );
279+ } else {
280+ return redirect ('loginForm ' );
281+ }
278282 }
279283
280284 private function getUserSession (Request $ request ){
Original file line number Diff line number Diff line change 3838 'label-login ' => 'Login ' ,
3939 'label-registration-success ' => 'Successful registration! Check your mail box to verify your e-mail address ' ,
4040 'label-account-actived ' => 'Account successfully activated ' ,
41- 'label-logout ' => 'Logout '
41+ 'label-logout ' => 'Logout ' ,
42+ 'label-logged ' => 'is logged '
4243
4344];
Original file line number Diff line number Diff line change 2424 'label-login ' => 'Accedi ' ,
2525 'label-registration-success ' => 'Registrazione avvenuta con successo! Accedi alla tua casella di posta per verificare la tua e-mail ' ,
2626 'label-account-actived ' => 'Account attivato correttamente ' ,
27- 'label-logout ' => 'Esci '
27+ 'label-logout ' => 'Esci ' ,
28+ 'label-logged ' => 'sei autenticato '
2829];
Original file line number Diff line number Diff line change 11@extends (' base' )
22
33@section (' content' )
4- <h4 class =" text-center mt-5" >{{ session ()-> get (' user' )-> name } } sei già loggato </h4 >
4+ <h4 class =" text-center mt-5" >{{ session ()-> get (' user' )-> name } } @lang ( ' auth.label-logged ' ) </h4 >
55@endsection
You can’t perform that action at this time.
0 commit comments