0

I want to update session lifetime in middle ware. I am using Auth Guard. if I set config('session.life=>'3') value in from admin its get updated on both side, and when the Maximum session time is reached both user gets logout. Can you please recommend me the best way to do this.

Muhammad Waqas
  • 1,140
  • 12
  • 20
  • Please [edit] to add meaningful code and a problem description here. Posting a [mcve] that demonstrates your problem will increase your chances of getting good answers. Perhaps you should look into creating a middleware to handle this scenario: https://laravel.com/docs/7.x/middleware – Dan Mason Jul 01 '20 at 13:40
  • By default Laravel shares the same session to the entire application, so changing its lifetime for one role will change it for everyone. You'll need to use multiple sessions (one for each role). I think this answer will help you: https://stackoverflow.com/a/33404870/8555937 – user8555937 Jul 01 '20 at 13:54

0 Answers0