In Laravle5.3 I want to use multiple session driver,in the frontend I just use redis as the driver but in the backend have to use database as the driver,I tried but cant find a way to solve this problem,first I just use middleware before the session start,like
class AdminSessionDriver
{
public function handle($request, Closure $next)
{
if ($request->is('admin/*')) {
Config::set('session.driver', 'ext_database');
}
return $next($request);
}
}
then in the admin route I will add the middleware, but if this when I use Multi guard,first login admin in the backend then login user in the frontend, the backend admin user is logout,but if I use the one session driver it is good,so it is a error, how to solve this question.thanks