title: Dynamic table name in join query alias in Laravel 5
body: <p>How to alias a table name in <code>Laravel 5</code>?</p>
  
  <pre><code>$data['recent_reviews'] = $reviews_table_name::where('source', 'LIKE', '%YELP%')-&gt;orderby('reviews_'.$l_state.'.id', 'desc')
      -&gt;leftJoin($res_tbl_name, 'reviews_'.$l_state.'.restaurant_id', '=', $res_tbl_name.'.id')
      -&gt;take(6)
      -&gt;get();
  </code></pre>
  
  <p>Actually i need the table name alias like below.</p>
  
  <pre><code>$res_tbl_name AS r
  </code></pre>
  
  <p>Thanks.</p>