Laravel 5 Tutorial (06) :: Pagination in laravel 5

In last tutorial we have fetched data from our database table.In this tutorial we’ll do pagination for our data.Let’s see the process.

You can read previous posts

Pagination :

  • Open your TodoController and go to index method and replace the code

replace with

  • Now open your home.blade.php file and add the line at the bottom of table tag
<?php echo $data->render(); ?>


Now save the file. It really simple to add pagination in laravel 5. Now run the project and look a pagination has added at the bottom of your data.



Share on :

2 Responses to “Laravel 5 Tutorial (06) :: Pagination in laravel 5”

  1. Wiksiloh says:

    is it possible to query the Todo::all();

    for example I only want to select Todo that is with status = complete.

    how will I do that?…

Leave a Reply

× eight = 64