title: how to post multiple forms to same route using SlimFramework?
body: <p>I have the following view (main.php) that contains two separate forms that post to the same route:</p>
  
  <pre><code>&lt;form class="form" id="first_form" action="{{ urlFor('main.post') }}" method="post"&gt;
      // form data
  &lt;/form&gt;
  
  &lt;form class="form" id="second_form" action="{{ urlFor('main.post') }}" method="post"&gt;
      // form data
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is the route logic that renders that view and also post the form data:</p>
  
  <pre><code>$app-&gt;get('/main', function() use ($app) {
      $app-&gt;render('main.php');
  })-&gt;name('main');
  
  $app-&gt;post('/main', function() use ($app) {
      // do something
  })-&gt;name('main.post');
  </code></pre>
  
  <p>Now within my <code>$app-&gt;post</code> method, I would like to differentiate between which form was submitted and do separate logic accordingly, like so:</p>
  
  <pre><code>$app-&gt;post('/main', function() use ($app) {
      if(first form was submitted) {
         // do something
      } else if(second form was submitted){
         // do something else
      }
  })-&gt;name('main.post');
  </code></pre>
  
  <p><strong>Does what I am trying to accomplish need to utilize Middleware? if not, what logic do i need to implement to accomplish this seemingly simple task</strong>? </p>