php - Getting the Form input value in Laravel -


are there other ways value of <input> in laravel besides input::get('name'); ?

here route tries , value

route::get('delete_comment_action/{id}', function($id)/ {      $status_id = input::get('status_id');     print_r($status_id);     exit();      return redirect::back(); }); 

here form should have data in it

<form action="" method="get">             <input type="hidden" name ="status_id" value="{{$swagger->status_id}}">              <a href ="{{{ url("delete_comment_action/$swagger->id") }}}"><button type="button" class="btn btn-danger">delete</button></a>             </form> 

status_id should @ least equal 1, when try using, instead displays blank page.

$variable = input::get('status_id');   print_r($variable); 

your routes looks okay change form submit tag instead link

route::get('delete_comment_action/{id}', function($id){      $status_id = input::get('status_id');     print_r($status_id);     exit();      return redirect::back(); }); 

in form view change form action , replace anchor tag link submit button

  <form action="{{{ url("delete_comment_action/$swagger->id") }}}" method="get">         <input type="hidden" name ="status_id" value="{{$swagger->status_id}}">         <input type="submit" value="delete">   </form> 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -