title: Laravel 5.8 get tables belonging to a user
body: <p>I am listing all tables in the <code>DB</code>that are prefixed with the <code>user-&gt;id + _</code> (eg: <code>2_my_table</code>) like so:</p>
  
  <pre><code>$account = Auth()-&gt;user();
  $tables = DB::select("SHOW TABLES LIKE '" . $account-&gt;id . "_%'");
  </code></pre>
  
  <p>This works and returns an array like this:</p>
  
  <pre><code>array:1 [▼
    0 =&gt; {#577 ▼
      +"Tables_in_mydb (2_%)": "2_country_list"
    }
  ]
  </code></pre>
  
  <p>Why does it add the <code>(2_%)</code> search pattern to the <code>Tables_in_mydb</code> property?</p>
  
  <p>This causes issues later when try and describe the tables like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>if (count($tables)) {
      foreach ($tables as $table) {
          $table-&gt;columns = DB::select('describe '.$table-&gt;Tables_in_mydb);
          $table-&gt;rows = DB::select('SELECT COUNT(*) AS count FROM '.$table-&gt;Tables_in_mydb);
      }
  }
  </code></pre>