Laravel join with limit
<p>I have the following working for laravel paginate</p>

<pre><code>$query = DB::table('clients')
            -&gt;leftJoin('radusergroup', 'clients.username', '=', 'radusergroup.username')
            -&gt;leftJoin('recharge', 'clients.username', '=', 'recharge.soldto');
</code></pre>

<p>I want to join some values from two tables radusergroup and recharge. radusergroup always return one row as it has only one row stored whereas recharge table return multiple rows. I want only one row returned from recharge table which is latest entry.</p>

<p>Right now its return all the possible rows from recharge table and showing it on paginated view.</p>