title: How to store Carbon DateTime ISO object in Sub Json Document in Laravel 5.2 MongoDB
body: <p>I am trying to store Carbon datetime in Sub Json Document but instead of storing in ISO format its storing in different way shown below.</p>
  
  <pre><code>"_id" : ObjectId("5791bc3d6e79d211aa5be019"),
  "breakUps" : [ 
     {
          "amount" : 2000,
          "expiry" : {
              "date" : "2016-09-05 06:25:01.000000",
              "timezone_type" : 3,
              "timezone" : "UTC"
          }
      }
  ],
  "updated_at" : ISODate("2016-07-22T06:25:01.576Z"),
  "created_at" : ISODate("2016-07-22T06:25:01.576Z")
  </code></pre>
  
  <p>Instead it should have been stored like <strong>ISODate("2016-07-22T06:25:01.576Z")</strong> format.</p>
  
  <p>My Eloquent Model class is:</p>
  
  <pre><code>class Configurations extends Eloquent
  {
      public $incrementing = false;
      public  $timestamps = true;
      protected $collection = 'configurations';
      protected $dates = array('created_at','updated_at','breakUps.expiry');
  }
  </code></pre>
  
  <p>PHP Code which i am using for Saving the Object</p>
  
  <pre><code>$config1 = new Configurations();
  $config1-&gt;breakUps = [['amount' =&gt; 1000, 'expiry' =&gt; Carbon::now()-&gt;addDays(30)]];
  $config1-&gt;save();
  </code></pre>