Thursday, 15 May 2014

php - How to paginate data not from database in laravel 5 -


I have something like this:

This data is not from the database . ('Data', $ n);

Return view ('Admin / Panel') ->

The data you provided in the link is suspicious, so I recommend updating your question with more information on this.

From:

Sometimes you can manually create an endorsement example to pass an array of items. You can do this by creating any Illumination \ Paging \ Paginator or Illuminate \ Pagination \ LengthAwarePaginator instance based on your needs.

This can be done like this:

  $ paged = PageCanator :: create ($ items, calculations ($ items), input :: find ( 'Border') ?: '10');  

Do not forget the usage statement for the pageinator mask ( used pageinator; ) at the top of your file.

Alternatively, you can use method dependency injection:

  public function someMethodName (Pageinator $ Pageinator) {$ items = []; $ Paginator-> Return ($ item, count ($ item), input :: find ('border') ?: '10'); }  

No comments:

Post a Comment