Hi,
i'm using impersonate 1.2 on my laravel 5.6 installation.
I'm going to admin area and on every user i've put a button "login as user" and i call impersonate function on my HomeController :
public function impersonate($user_id){
if ($user_id!= ''){
$user = User::find($user_id);
Auth::user()->impersonate($user);
return redirect()->route('myPlan.history');
}
return redirect()->back();
}
but when i click on that i cannot open route myPlan.history impersonated as other user. But if i login with another simple user and then go back to admin area and click again on "login as user" every works fine, so i think that function doesn't create a user session.
How can i fix?
Thanks
Hi, i'm using impersonate 1.2 on my laravel 5.6 installation. I'm going to admin area and on every user i've put a button "login as user" and i call impersonate function on my HomeController :
but when i click on that i cannot open route myPlan.history impersonated as other user. But if i login with another simple user and then go back to admin area and click again on "login as user" every works fine, so i think that function doesn't create a user session. How can i fix? Thanks