title: laravel get Illegal string offset error on getting jsonObject value
body: <p>in this result of </p>
  
  <pre><code>{#457 ▼
    +"id": 14
    +"amount": "110092"
    +"discount": 0
    +"images": "{"images":{"original":"\/uploads\/post_images\/2017\/1513070310.jpeg","300":"\/uploads\/post_images\/2017\/300_1513070310.jpeg","600":"\/uploads\/post_images\/2017\/600_1513070310.jpeg","900":"\/uploads\/post_images\/2017\/900_1513070310.jpeg"},"thumbnail":"\/uploads\/post_images\/2017\/300_1513070310.jpeg"} ◀"
    +"created_at": "2017-12-28 17:48:48"
    +"updated_at": "2017-12-28 19:24:18"
  }
  </code></pre>
  
  <p>query, i'm trying to get <code>thumbnail</code> from images column which <code>images</code> is <code>JsonObject</code>, but i get this error:</p>
  
  <pre><code>"Illegal string offset 'thumbnail'"
  </code></pre>
  
  <p>my code:</p>
  
  <pre><code>$userShoppings = \DB::table('payments as s')
      -&gt;join('products as p', 's.product_id', '=', 'p.id')
      -&gt;select('p.*', 's.*',\DB::raw('s.ordering_count * s.price as cost'))
      -&gt;whereUserId(auth()-&gt;user()-&gt;id)
      -&gt;first();
  
  dd($userShoppings-&gt;images['thumbnail']);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>dd($userShoppings-&gt;images['images']['thumbnail']);
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>"Illegal string offset 'images'"
  </code></pre>
  
  <p>my models:</p>
  
  <pre><code>class Shopping extends Model
  {
      protected $fillable = [];
  
      protected $casts=[
          'images'=&gt;'array'
      ];
  }
  
  class Payment extends Model
  {
      protected $fillable = [];
  
      protected $casts=[
          'images'=&gt;'array'
      ];
  }
  </code></pre>