title: Redirect route with two parameters in WITH [Laravel]
body: <p>I have problem to pass two varialbles with "with" in Redirect::route... Here is my code...</p>
  
  <p>How to do this</p>
  
  <pre><code>return Redirect::route('cart-success')-&gt;with(
              array(
                  'cartSuccess' =&gt; 'You successfuly ordered. To track your order processing check your email', 
                  'cartItems' =&gt; Cart::contents()
              )
          );
  </code></pre>
  
  <p>Here is error:</p>
  
  <p><strong>Undefined variable: cartItems (View: C:\xampp\htdocs\laravel-webshop\laravel\app\views\cart-success.blade.php)</strong></p>
  
  <pre><code>Route::group(array('before' =&gt; 'csrf'), function() {
      //Checkout user POST
      Route::post('/co-user', array(
          'as' =&gt; 'co-user-post',
          'uses' =&gt; 'CartController@postCoUser'
      ));
  });
  </code></pre>
  
  <p>CONTROLLER</p>
  
  <pre><code>public function postCoUser() {
      $validator = Validator::make(Input::all(), array(
          'cardholdername' =&gt; 'required',
          'cardnumber' =&gt; 'required|min:16|max:16',
          'cvv' =&gt; 'required|min:3'
      ));
  
      if($validator-&gt;fails()) {
          return Redirect::route('checkout')
                  -&gt;withErrors($validator)
                  -&gt;withInput();
      } else {
          return Redirect::route('cart-success')-&gt;with(
              array(
                  'cartSuccess' =&gt; 'You successfuly ordered. To track your order processing check your email', 
                  'cartItems' =&gt; Cart::contents()
              )
          );
      }
  }
  </code></pre>
  
  <p>View</p>
  
  <pre><code> @extends('publicLayout.main')
  
   @section('content')
     @if(Session::has('cartSuccess'))
      &lt;p&gt;{{ Session::get('cartSuccess') }}&lt;/p&gt;
  
      &lt;?php $total = 0; ?&gt;
      @foreach ($cartItems as $cartItem)
          Name: {{ $cartItem-&gt;name }} &lt;br&gt;
          Price: {{ $cartItem-&gt;price }} &amp;euro;&lt;br&gt;
          Quantity: {{ $cartItem-&gt;quantity }} &lt;br&gt;
          &lt;?php $final = $cartItem-&gt;price * $cartItem-&gt;quantity; ?&gt;
          Final price: {{ $final }} &amp;euro;&lt;br&gt;
          &lt;?php $total += $final; ?&gt;
          &lt;hr&gt;
      @endforeach
      Total: {{ $total }} &amp;euro;
   @endif
  @stop
  </code></pre>