Support the ongoing development of Laravel.io →
Requests Input Views
Last updated 2 years ago.
0

What's your route for insertOrder()? If it's not /summary, then I don't see why a refresh on the redirected summary page will execute this code again.

If you want to get those three variables to the redirected page, do it just as you did in your code example (flash them to the next request using ->with()), then retrieve them with session get (in the laravels docs: http://laravel.com/docs/responses#redirects).

So, on /summary,

$order_id = Session::get('orderId');
// etc...

Perhaps look at the docs / basic mvc concepts again. You shouldn't really be handling variables at all in your routes.php file.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

soclosed soclosed Joined 5 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.