title: How to alias a table in Laravel Eloquent queries (or using Query Builder)?
body: <p>Lets say we are using Laravel's query builder:</p>
  <pre><code>$users = DB::table('really_long_table_name')
             -&gt;select('really_long_table_name.id')
             -&gt;get();
  </code></pre>
  <p>I'm looking for an equivalent to this SQL:</p>
  <pre><code>really_long_table_name AS short_name
  </code></pre>
  <p>This would be especially helpful when I have to type a lot of selects and wheres (or typically I include the alias in the column alias of the select as well, and it gets used in the result array). Without any table aliases there is a lot more typing for me and everything becomes a lot less readable. Can't find the answer in the laravel docs, any ideas?</p>