I'm working on a project in Laravel. In a certain part I need to send data to a controller via jquery and from the data obtained in the controller, redirect to another view. How can I do this? I usually use Ajax, but with it I think there's no way.
Ajax I've tried:
$.ajax({
url: "{{ URL::route('checkout.concluir') }}",
type: "POST",
data: {
forma_pagamento : forma_pagamento,
endereco_id : endereco_id,
frete : frete
},
cache: false,
processData:true,
success: function(data)
{
window.location.href = "{{ URL::route('checkout.concluir', data ) }}";
}
});
});
Controller return:
return View::make('frontend.checkout.concluido', $this->data);