Can you explain why paginate is not working?
There are other methods for sure, you can use take but that's like using limit, you will not be able to get the next page of 20 results.
Payment::take(20)->get();
is there any other method for all()? im getting a big collection and paginate is not working. it only gets the first page of pagination
heres my code
controller:
$payments = Payment::paginate(20);
blade:
<?php
foreach($payments as $payment){
if($client->id == $payment->id){
$pay+= $payment->loan_interest+$payment->loan_amount+$payment->loan_cbu;
}
}
$balance = $cap-$pay-$rev;
?>
<tr>
<td>{{$balance}}</td>
</tr>
Please or to participate in this conversation.