First of all, I am a Chinese student. I will try my best to explain my question, but my English is not very good. So sorry.
In my login web, I will use ajax post
data(id,passwd...)
to a route. After all confirm, if the data was right, login web will redirect to another web route. But the controller function can not redirect. Like:
return redirect('wx/setdev');
//not work in controller function ,but work in route function
If I submit a form to controller, controller can redirect to the web route but ajax
can't.
$.post("{{route('cfmlogin')}}",{
_token : "{{csrf_token()}}",
user : $('#num').val(),
passwd : $('#passwd').val()
});
I don't know why! Please help me with this.
Thanks