title: how to retrive form.serialize() data in laravel controller
body: <p>I use <code>$("form").serialize()</code> to submit form data. while I return value from a method it works fine. My method code is as below.</p>
  
  <pre><code> public function store(Request $request)
   {
      $list = @$request['lists'];
      $total_amount = @$request-&gt;total_amount;
      $r_g_amount = @$request-&gt;r_g_amount;
      $type = @$request-&gt;type;
      $cash = @$request-&gt;cash;
      $credit = @$request-&gt;credit;
      $bank = @$request-&gt;bank;
      $from = @$request-&gt;from;
      $to = @$request-&gt;to;
      return $cash;
    }
  </code></pre>
  
  <p>it sends me null value, if I <code>return $request-&gt;formdata</code> then it sends me all details of form. <code>formdata</code> is variable which I pass from <code>ajax</code> as <code>formdata:$("form").serialize()</code>. </p>
  
  <p>so how can I get values of form data into <code>variable</code>.</p>
  
  <p>ajax request</p>
  
  <pre><code> $.ajax({
      url: "{{ route('HK.store') }}",
      data: {
         lists: list, total_amount: total_amount, formdata : $("form").serialize(), "_token": "{{ csrf_token() }}"
      },
      type: "POST",
      success: function (data) {
      console.log(data);
      }
   });
  
  enter code here
  </code></pre>