I really did not see any of your code, but as I understood: try to flash the data from one view to the other with get as:
/* array $data with the keys and values after the first validation */
flash($data)
redirect('/somewhere');
I hope this give you a idea
Am getting this error Call to undefined function App\Http\Controllers\flash()
Session::flash($data)
I am sorry I forgot about the facade method
Now should work, and be aware that this value only lives for one request,
And I don't exact what you are doing, but look at old() laravel documentation. You might inside your input to preserve the value after a validation fail,
<input type="text" value="{{old($form->value)}}" for="field_name">
@Lucas Oliveira
Thank you for your support. I believe you misunderstood me.
Here is my route.
Route::get('add-job', ['as' => 'add.job', 'uses' => 'HomeController@addJob');
Route::post('add-job', ['as' => 'store.job', 'uses' => 'HomeController@storeJob');
And inside my ``` HomeController@storeJob
I want to return a view after the form is validated thus when no data errors and data saved into database.
But after my validation check. I did
return view('user.manage-job');
This works. but when you press F5 on the keyboard or refresh button is press them form submits again.
To solve this issue i have to use ```
redirect() method.
I don't want to use ``` redirect->route('user.manage.route');
I want the url to maintain as > add.job
I hope you understand now
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community