I have a form on my page
<form method="post" action="{{url('/vpage')}}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="w100">
<button name="hostel1" class="submitBTN addnowBtn" type="submit" value="The Venetian"> Add Now</button>
</div><!--w100-->
</form>
I getting the request printed in my controller like
public function vegaspage(Request $request){
dd($request);
die;
}
I have also have many fields on my page , when the request params comes to browser the submit button value is not coming in request Any ideas ?
Inside your controller function try this:
Input::get('hostel1', 'NA');
// It will return its value ie `The Venetian` otherwise `NA`
Note: The second parameter of Input::get()
is the default value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With