Luracast / Laravel-Database

Laravel database for your non laravel projects. Built on top of illuminate/database to provide migration, seeding and artisan support
85 stars 12 forks source link

Issue with pagination #6

Closed anuragte88 closed 8 years ago

anuragte88 commented 8 years ago

Thanks for creating this wonderful package. I have used this package with Restler 3.0 but got pagination error. So please include illuminate/pagination component in composer.json file.

Arul- commented 8 years ago

You have used it laravel 4.2.* components or 5.2.* components?

Arul- commented 8 years ago

Also posting the exact error message you are getting and a sample code to reproduce will help

anuragte88 commented 8 years ago

I have used 5.2.* component with Restler 3.0. Below are the steps to reproduce this error.

  1. Create laravel model file. For example I have created Book.php inside app/model directory.
  2. I have used this model in Restler api class. When I try to return pagination data in Api call then it show error "Illuminate\Pagination\Paginator class not found".
  3. I have used simple laravel model method to return pagination data. For example :- Book::paginate(10);
  4. So for resolve above issue. I have included "illuminate/pagination" : "5.2.*" component in composer.json file and run composer update command. After this issue resolved.
Arul- commented 8 years ago

@anuragte88 thanks for the clear report 👍

We just released version 5.2.2 (21c7b67d16c72d4b71bd19a4e3b75cb2bd929b28) with pagination support :)

It uses illuminate/pagination and also configures it properly in bootstrap/autoload.php