title: Laravel : How to store json format data in database?
body: <p>I want to store some json format data in database from a given array. But How i do store it using controller.</p>
  <p>Suppose I have json data like :</p>
  <pre><code>{&quot;id&quot;:&quot;bangladesh&quot;,&quot;divisions&quot;:[{&quot;name&quot;:&quot;Barisal&quot;},{&quot;name&quot;:&quot;Chittagong&quot;},{&quot;name&quot;:&quot;Dhaka&quot;},{&quot;name&quot;:&quot;Khulna&quot;},{&quot;name&quot;:&quot;Rajshahi&quot;},{&quot;name&quot;:&quot;Rangpur&quot;},{&quot;name&quot;:&quot;Sylhet&quot;}]}
  </code></pre>
  <p>So far as I know in controller using json format is like this as I'm not fully aware of it.</p>
  <pre><code>public function saveUser(Request $request)
  {
      $div=new Div();
      $user-&gt;json = json_encode( array({&quot;Date 1&quot;: {
          {&quot;id&quot;:&quot;bangladesh&quot;,&quot;divisions&quot;:[{&quot;name&quot;:&quot;Barisal&quot;},{&quot;name&quot;:&quot;Chittagong&quot;},{&quot;name&quot;:&quot;Dhaka&quot;},{&quot;name&quot;:&quot;Khulna&quot;},{&quot;name&quot;:&quot;Rajshahi&quot;},{&quot;name&quot;:&quot;Rangpur&quot;},{&quot;name&quot;:&quot;Sylhet&quot;}]}   
      $div-&gt;save();    
      return redirect('getList');
  }
  </code></pre>
  <p>How do i save it in mySQL only the list of divisions in Division Model using Laravel Controller?</p>