title: How to get all HMSET - Laravel Redis
body: <p><a href="https://i.stack.imgur.com/r8OgK.png" rel="nofollow noreferrer">Hmset Example Screenshot</a></p>
  <p>This is my demo hmset example, I try to get all hmset list by Redis::hgetall(&quot;hmset_demo:user_id:*&quot;), but it return a empty array [].</p>
  <p>How can I get this return:</p>
  <pre><code>[{
      &quot;id&quot;: &quot;1&quot;,
      &quot;name&quot;: &quot;name edited 1&quot;,
      &quot;description&quot;: &quot;desc edited 1&quot;,
      &quot;avatar&quot;: &quot;xxx 1&quot;
  },
  {
      &quot;id&quot;: &quot;1&quot;,
      &quot;name&quot;: &quot;name edited 1&quot;,
      &quot;description&quot;: &quot;desc edited 1&quot;,
      &quot;avatar&quot;: &quot;xxx 1&quot;
  },
  ...
  ]
  </code></pre>
  <p>PS: I use the following code to insert:</p>
  <pre><code>Redis::hmset(&quot;hmset_demo:user_id:&quot;.$id, [
              'id'    =&gt;  $id,
              'name'    =&gt;  'name edited '.$id,
              'description'    =&gt;  'desc edited'.$id,
              'avatar'    =&gt;  'xxx'.$id,
          ]);
  </code></pre>
  <p>I can get specific hmset data by this code:</p>
  <pre><code>$id = 1;
  Redis::hgetall(&quot;hmset_demo:user_id:&quot;.$id);
  </code></pre>