I have a text field like
{!! Form::textarea('representive[address_1]' ,null ,['class' =>'textboxlong form-control','style'=>'height:60px;']) !!}
In my form. And when I try to get its value in my controller but it comes null. What I try is
$adress = Request::get('representive.0.address_1');
I also tried some other ways but could not end up with a proper solution. How can I get the value of this field? Any help would be appreciated.
Request::get('representative');and then take the values from that array?Request::get('representative.address_1');. The ".0" part is what shouldn't be there. Also you misspelled the variable as "$adress" by the way.Request::get('representative.address_1');does not work. I tried it alreadyInput::get('representative.address_1');. TheRequest::get()method doesn't understand dot notation because it's a Symfony method. Otherwise, Joel Hinz's answer would also work if you need to use Request::get() for some reason.