php - Laravel 5 getting input values that are arrays -


i have text field

{!! form::textarea('representive[address_1]' ,null ,['class' =>'textboxlong form-control','style'=>'height:60px;']) !!} 

in form. , when try value in controller comes null. try is

$adress = request::get('representive.0.address_1'); 

i tried other ways not end proper solution. how can value of field? appreciated.

the request::get() method implemented symfony\component\httpfoundation\request illuminate\http\request class extends. method not parse string parameter passed using dot notation laravel does. should instead using request::input does:

$adress = request::input('representive.address_1'); 

as alternative can use input facade , input::get().


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -