How to pass data from anchor tag in laravel?
Posted: Wed Dec 14, 2016 8:37 am
I currently have a form in laravel on whos submission the following methods run:
So i have the below line that passes the data to the next page:
But what i would really want to do is, when the form is submitted, i would really just want to show a link on the next page , which will be coded like so:
Now on click on the link , i would like to show a view with all the data that the user submitted in the form , How do i do this ? I.E. How do i pass the data form from the <a> to the view that will show up when clicked on the <a> ??
So just to put things into perspective, this is how it works now:
How i want it to work is:
Thank you.
Gautam.
Code: Select all
public function validateSave() {
$qualitycheck = new QualityCheck();
$qualitycheck['site-name'] = Request::input('site-name');
$qualitycheck['favicon'] = Request::has('favicon');
$qualitycheck['title'] = Request::has('title');
$qualitycheck['image-optimization'] = Request::has('image-optimization');
$qualitycheck->save();
Session::flash('quality-data', $qualitycheck);
return redirect('/');
}
Code: Select all
Session::flash('quality-data', $qualitycheck);Code: Select all
@if(Session::has('quality-data'))
<a href="">Submited Quality Check</a>
@endif
So just to put things into perspective, this is how it works now:
Code: Select all
STEP-1 :: User submits form , data is flashed to next page.
STEP-2 :: Data user submits is shown on this page.
Code: Select all
STEP-1 :: User submits form , data is flashed to next page.
STEP-2 :: A link is shown to the user(Only if user clicks on the link we move to the next step).
STEP-3 :: Data user submited in first step is shown on this page.
Gautam.