mardi 11 février 2020

Display laravel Pagination links twice in a page

I have implemented a laravel pagination in one of my project where pagination is working like a charm.

I have a requirement to display a pagination links on top of the table as well as the bottom of the table. Like this

{!! $entries->render() !!}
<table class="table table-responsive" id="entries-table">
    <thead>
        <tr>
                <th>ID</th>
                <th>Advisor name</th>
        </tr>
    </thead>
    <tbody>
    @forelse($entries as $entries)
        <tr>
            <td>  </td>
            <td>  </td>
        </tr>
    @empty
    <tr>
        <td>
            <p>No record found.</p>
        </td>
    </tr>
    @endforelse
    </tbody>
</table>
{!! $entries->render() !!}

When I try to use {!! $entries->render() !!} one more time in the bottom of the table or anywhere in a same page, it throws me the below error.

ErrorException (E_ERROR) Call to undefined method App\Models\Entries::render()



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3bwl8I7
via IFTTT

Aucun commentaire:

Enregistrer un commentaire