title: How to set variable in routes - laravel
body: <p>I have the following route in my routes.web.php. Looks like this...</p>
  
  <pre><code>Route::get('/spielerAuswahl/{somevar}', 'SpielplanController@getHeimGast');
  </code></pre>
  
  <p>In the variable {somevar} I have for example Nr1=111&amp;Nr2=222. The route works fine in a get to SpielplanController...</p>
  
  <pre><code>public function getHeimGast(){
          $var = $somevar;
          return view('test')-&gt;with('variableControllerSomevar', $var);
      }
  </code></pre>
  
  <p>In this function I want to put the Nr1=111&amp;Nr2=222 in the $var and make then an easy output of this variable in the view. How to get that?</p>