title: laravel - get parameters from http request
body: <p>I want to pass in multiple parameters from my Angular app to my Laravel API, namely the <code>id</code> and <code>choices</code> array supplied by user.</p>
  <p><strong>Angular:</strong></p>
  <p>http request:</p>
  <pre><code>verifyAnswer: function(params) {
      return $http({
          method: 'GET',
          url: 'http://localhost:8888/api/questions/check',
          cache: true,
          params: {
              id: params.question_id,
              choices: params.answer_choices
          }
      });
  </code></pre>
  <p><strong>Laravel 5:</strong></p>
  <p>routes.php:</p>
  <pre><code>$router-&gt;get('/api/questions/check/(:any)', 'ApiController@getAnswer');
  </code></pre>
  <p>ApiController.php:</p>
  <pre><code>public function getAnswer(Request $request) {
      die(print_r($request));
  }
  </code></pre>
  <p>I thought I should use <code>:any</code> within my URI to indicate I'll be passing in an arbitrary amount of parameters of various data structure (id is a number, choices is an array of choices).</p>
  <p>How can I make this request?</p>
  <hr />
  <blockquote>
  <p>[200]: /api/questions/check?choices= choice+1 &amp;choices= choice+2 &amp;choices= choice+3 &amp;id=1</p>
  </blockquote>