samedi 29 février 2020

Laravel 5.5 : SimplePaginate get the lastPage

We implemented the simplePaginate in our application but our version of laravel is 5.5 which is lastPage() is not yet available.

Question: Any guide where I can get the lastPage of my pagination?

View

<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12 col-lg-12">
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover general-journal-report-table" id="gj-report">
            <thead class="thead-global">
                <tr>
                    <th id="pj_sequence">Sequence No.</th>
                    <th id="pj_date">Posting Date</th>
                    <th id="pj_op">Transaction No.</th>
                    <th id="4">Document Reference</th>
                    <th id="5">Remarks</th>  
                    <th id="6">Amount Due</th>
                </tr>
            </thead>
            <tbody class="general-journal-report-details">
                @if($defined_gj)
                <?php $counter = 0; ;?>
                <?php $total_debit = 0; ?>
                @foreach($defined_gj as $key => $value)
                    <?php $counter++;?>
                    <?php $total_debit += $value->debit ;?>
                    <tr>
                        <td class="pj_sequence"></td>
                        <td class="pj_date"></td>
                        <td class="pj_op">{!! $value->number !!}</td>
                        <td></td>
                        <td></td>
                        @if($value->debit == '0')
                        <td></td>
                        @else
                        <td align="right"> </td>
                        @endif
                    </tr>
                @endforeach
                    <tr>
                        <td><b>Total</b></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td align="right"> </td>
                    </tr>
                @endif
            </tbody>
        </table>
    </div>
    <p style="font-size: 12px;"><i>page  out of</i></p> 
    
</div>


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire