This is very simple session logic. I don't know why this isn't working. Here the code.
if(Session::get('sign_up_data')){
echo 1;
}else{
echo 2;
Session::put('sign_up_data',21);
}
exit;
Always echoing 2 every time i reload the page. I am expecting echoing 2 on first load then the next 1 and 1 and 1 and soon. Tried different approach but still getting the same result. Do you any idea guys?