Support the ongoing development of Laravel.io →
posted 8 years ago
Session
Last updated 2 years ago.
0

If you want to display the input values on another page before you proceed further with it you can use Session::put(Request::all())

If you want to summarize input values on the same page where the form is use plain javascript. With angularjs that's a 5 minutes job.

0

rdxrbn said:

i have input user form i want to display that to the user before they submit

Should i use sessions or any other way in laravel 5 please help me ?

you also can do this on your target method, example :

/*your form*/

<form method="post" target="some_method">
  <input type="text" name="field1"/>
  <input type="submit"/>
</form>

/*your method*/
public function some_method(Request $request)
{
/*display the data*/
$data=$request->input();
return $data;
}

if you only display the data, you don't need to store it into session

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

rdxrbn rdxrbn Joined 28 May 2015

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.