title: How to send values to session ? Laravel
body: <p>I'm making a cart. For now I can add products to session and view them in my cart. This is my CartController functions:</p>
  
  <p><code>Add</code> function:</p>
  
  <pre><code>public function add(Request $request, $id)
  {
      $request-&gt;session()-&gt;push('cart', $id);
      flash()-&gt;success('Prekė sėkmingai pridėtą į krepšelį.');
      return redirect('/prekes');
  }
  </code></pre>
  
  <p><code>Show</code> function:</p>
  
  <pre><code>public function show()
  {
  
      $products = session('cart');
      $products = Product::find($products);
      return view('cart.show', compact('products'));
  }
  </code></pre>
  
  <p>And this is a <code>Product</code> page:</p>
  
  <pre><code>    &lt;div class="mainContainer"&gt;
          &lt;h1&gt;{{$product-&gt;title}} &lt;i class="fa fa-shopping-cart" aria-hidden="true"&gt;&lt;/i&gt;&lt;/h1&gt;&lt;br&gt;
                  &lt;img style="height: 200px" src="{{$product-&gt;image}}"&gt;&lt;br&gt;
                  &lt;p&gt;{!! $product-&gt;description !!}&lt;/p&gt;
          &lt;div class="bootstrap-wrapper"&gt;
              &lt;a style="float: right; margin-top: -150px; margin-right: 300px; font-size: 24px"
                 href="/prideti-i-krepseli/{{$product-&gt;id}}" class="btn btn-success"&gt;
                  &lt;i class="glyphicon glyphicon-shopping-cart"&gt;&lt;/i&gt; Pridėti į krepšelį&lt;/a&gt;&lt;br&gt;
              {{number_format($product-&gt;price, 2, '.', ',')}} EUR
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>So if I want to send some values from a form, how would I insert them in session ? Should I write post method code in <code>add</code> function ? Can you give me some example ? I want to make a form that will set a quantity for each item. </p>