title: How to use submit value in Controller switch case function?
body: <p>how can I get value data from submit button to validate the value in a switch case function? Here you can a part from my view.</p>
  
  <pre><code>{{Form::open(['route' =&gt; ['mgmtgroups_approvel', 'test' =&gt; $grouprequest-&gt;group_name]])}}
     Create User {{$grouprequest-&gt;username}} in Group {{$grouprequest-&gt;group_name}} ?
     {!! Form::submit('Yes',['class' =&gt; 'btn btn-default', 'name' =&gt; 'submitbutton', 'value' =&gt; 'save'])!!}
     {!! Form::submit('No',['class' =&gt; 'btn btn-default', 'name' =&gt; 'submitbutton', 'value' =&gt; 'nosave'])!!}
  {!! Form::close() !!}
  </code></pre>
  
  <p>And this is my Controller function with the switch case function.</p>
  
  <pre><code>public function setGroupApprovel(Request $request){
  switch($request-&gt;submitbutton) {
          case 'save': 
              $groups_create_subscription = new GroupSubscription();
              $groups_create_subscription-&gt;idgroups = $request-&gt;input('idgroup');
              $groups_create_subscription-&gt;subscriber = $request-&gt;input('iduser');
              $groups_create_subscription-&gt;save();
          break;
          case 'nosave': 
              $groups_request = new GroupRequest();
              $groups_request-&gt;iduser::find($request-&gt;iduser);
              $groups_request-&gt;request_active = 0;
              $groups_request-&gt;save;
          break;}
  </code></pre>
  
  <p>At the moment there is no use of the switch case function. Maybe the function is not able to read the submit value with 'save' and 'nosave'?</p>