When I login for the first time it works perfectly but when I log out from my app and try to re-login I get this error.
I\'ve tried almost every available solutions
You error may be coming from your session manipulation. When you do
Auth::attempt($data)
The user is already set in the session. You don't need to do your Session::put() thingy. To get the user, do
$user = Auth::user();
To logout, you do
Auth::logout(); //will clear the user from the session automatically
So to summarise, remove all the session manipulations you have in your code. Only play with Auth;
Session::flush(); //DELETE THIS LINE
Add Auth to the top of your controller with
use Auth; //easier to work like that.