title: Missing parameters that are passed to route using return redirect - Laravel
body: <p>Please confirm if the below steps are correct (Specially the return redirect() part)</p>
  
  <p>Route "Dashboard2" is expecting 2 variables as follows to open the Dashboard view through the getDashboard function :</p>
  
  <pre><code>Route::get('/dashboard2/{wordsRowB}/{wordsRowId}', [    
      'uses' =&gt; 'DashController@getDashboard',
      'as' =&gt; 'dashboard2',
      'middleware' =&gt; 'auth'
  
  ]);
  </code></pre>
  
  <p>So I passed to it these 2 variables as follows :</p>
  
  <p><strong>View Code :</strong></p>
  
  <pre><code>&lt;a href="{{ route('post.pin', [                    
                            'wordsRowId' =&gt; $wordsRowId,
                            'wordsRowB' =&gt; $wordsRowB
                           ]) }}"&gt;Test&lt;/a&gt; 
  </code></pre>
  
  <p><strong>Controller Code :</strong></p>
  
  <pre><code>public function postPin($wordsRowId,$wordsRowB)
      {
  
        return redirect()-&gt;route('dashboard2')
        -&gt;with(['wordsRowId' =&gt; $wordsRowId])
        -&gt;with(['wordsRowB' =&gt; $wordsRowB]);
  </code></pre>
  
  <p><strong>I'm getting this error :</strong>  (You'll find 2 more variables in the error, that I removed from the above code for clarity)</p>
  
  <pre><code>Missing required parameters for [Route: dashboard2] [URI: dashboard2/{wordsRowB}/{wordsRowId}].
  in UrlGenerationException.php line 17
  at UrlGenerationException::forMissingParameters(object(Route)) in UrlGenerator.php line 332
  at UrlGenerator-&gt;toRoute(object(Route), array(), true) in UrlGenerator.php line 304
  at UrlGenerator-&gt;route('dashboard2', array()) in Redirector.php line 157
  at Redirector-&gt;route('dashboard2') in DashController.php line 323
  at DashController-&gt;postPin('62', '1', '39', 'kokowawa')
  at call_user_func_array(array(object(DashController), 'postPin'), array('post_id' =&gt; '62', 'user_id' =&gt; '1', 'wordsRowB' =&gt; '39', 'wordsRowId' =&gt; 'kokowawa')) in Controller.php line 80
  </code></pre>
  
  <p>Please note that using var_dump shows that the variables are passed to the postPin function, but I don't know how to check if they were successfully redirected to the route ?</p>