mardi 26 juillet 2016

pagination not working when clicking on page number

I am using laravel pagination. When I click on next page or any page number, nothing happens. Controller function

public function getIndex()
{
    $articles = Inspector::paginate(15);
    return view('admin.inspector.test', compact('articles'));
}

View file

     <table class="table table-bordered" id="mytable">
                        <thead>
                            <tr>
                                <th>Sr. No.&nbsp;</th>
                                <th>Email</th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach ($articles as $article)
                            <tr>
                            <td></td>
                            <td></td>
                            </tr>
                            @endforeach
                        </tbody>
                    </table>
                    {!! $articles->render() !!}

Any help is much appreciated...Thanks...



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire