title: Laravel 5 cache query - get result as associative array
body: <p>I want to cache query and get result as associative array.
  When I do it without caching like this, it's okay:</p>
  
  <pre><code>class ItemRepositoryEloquent {
  
      public function getItems() {
  
          $items= Item::lists('word','key');
  
          return $items-&gt;toArray();
  
      }
  
  }
  </code></pre>
  
  <p>But when I try to cache my query like this:</p>
  
  <pre><code>class ItemRepositoryEloquent {
  
      public function getItems() {
  
          $items = Cache::remember('items', 1440, function(){
              return Item::lists('word','key');
          });
  
          return $items-&gt;toArray();
  
      }
  
  }
  </code></pre>
  
  <p>It returns result like this:</p>
  
  <pre><code>[
      0 =&gt; array('key' =&gt; 'word')
      1 =&gt; array('key' =&gt; 'word')
      2 =&gt; array('key' =&gt; 'word')
      3 =&gt; array('key' =&gt; 'word')
      4 =&gt; array('key' =&gt; 'word')
      5 =&gt; array('key' =&gt; 'word')
  ]
  </code></pre>
  
  <p>But I want the result to be like this after caching:</p>
  
  <pre><code>[
      'key' =&gt; 'word',
      'key' =&gt; 'word',
      'key' =&gt; 'word',
      'key' =&gt; 'word',
      'key' =&gt; 'word'
  ]
  </code></pre>
  
  <p>Thanks in advance.</p>