Redirect with input |
I think we need something similar like in Laravel:
https://laravel.com/docs/5.3/responses#r...ssion-data https://laravel.com/api/5.2/Illuminate/H...ponse.html Why we need this? To show the form in one action method and in the other one handle the data processing... For CodeIgniter 3 I use a similar but very simple solution to achieve the same results, see below... I put the following code to the MY_Controller constructor: PHP Code: $_previous_data = $this->session->flashdata('_previous_data'); ...and I created the following helper method for the redirect: PHP Code: if( ! function_exists('redirect_with_input')) I am not saying we should use something similar, it's just here to show an implementation... Laravel's approach is much cleaner & have more options... |
Messages In This Thread |
Redirect with input - by orionstar - 01-03-2017, 01:53 PM
RE: Redirect with input - by kilishan - 01-03-2017, 03:23 PM
RE: Redirect with input - by orionstar - 01-04-2017, 05:15 AM
RE: Redirect with input - by kilishan - 01-06-2017, 07:38 PM
RE: Redirect with input - by Diederik - 01-07-2017, 01:14 AM
|