This question already has an answer here:
- Laravel change input value 5 answers
Okay, this one is a bit tricky and unusual, but I need to do it for one of my project.
so I have 2 routes :
Route::get('table/edit', array('uses'=>'CompanyController@editTable'));
Route::post('table/update', array('uses'=>'CompanyController@editTableAction'));
Now the fields in the database table I'll be storing data are dynamic, So I must take advantage of the :
Input::all();
Method. There's a hidden input in my form
<input type="text" name="database_field_name_user_friendly" value="User Input Some Name" />
<input type="hidden" name="database_field_name" value="" />
Now, as you can see,
Input::get('database_field_name');
is empty. Is there a way I can set the value of this input box inside the controller? I need to process the value from another input field database_field_name_user_friendly . I'll run regex to make it a valid MySQL field name.
Any help will be much appreciated.
</div>