In laravel, if we want to redirect one page to another page, the most common way is using "a href" then controller will handle the href, in my case, i click a button, then i handle all case like empty or valid email in javascript, then i use ajax to create a link then from the link i will use windows.location to redirect, is it a good way? the reason why i use ajax is all variable that i need to pass is in javascript, and if i use laravel url, it is in php, and i don't know how to convert javascript to php
???, i just want to click a button, validate, open a new page, with data send using controller, and i want the most simple way, but i want to do it in javascript..
From my solution above, i use window.location, but before it load new page, it goes to controller where the controller will send the data right? so no data is missing