Package Data | |
---|---|
Maintainer Username: | etcinit |
Maintainer Contact: | ed@chromabits.com (Eduardo Trujillo) |
Package Create Date: | 2014-10-02 |
Package Last Update: | 2015-08-18 |
Home Page: | https://packagist.org/packages/eduard44/foundation-pagination |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-09 15:03:51 |
Package Statistics | |
---|---|
Total Downloads: | 2,100 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 5 |
Total Watchers: | 4 |
Total Forks: | 2 |
Total Open Issues: | 0 |
This Laravel 5 package provides a FoundationPresenter
class for generating
Foundation-themed pagination in your applications.
This will probably not work with Laravel 4. For the Laravel 4 version see the original project: https://github.com/binarix/Laravel-Foundation-Pagination
v3.0.0: Mainly cleaning up the code in general: Instead of relying on things
like string concatenation or sprintf
, the library now uses
etcinit/nucleus
's view component, which takes care of properly escaping the
HTML output of the paginator when needed.
Additionally, a SimpleFoundationPresenter
class is now available. It performs
the same function as it's Bootstrap counterpart in Laravel
v2.0.0: Adds support for Laravel 5.
WARNING: Version v3.0.0 hasn't been released yet. The instructions below might not work properly. For a stable release, please use v2.0.0.
The current release (v3.0.0) supports the following versions of Laravel, Lumen and Illuminated:
"laravel/framework": "~5.0",
"laravel/framework": "~5.1",
"lumen/framework": "~5.0",
"lumen/framework": "~5.1",
"chromabits/illuminated": "dev-master",
To include in in your project, simple use composer
:
$ cd /path/to/project
$ composer require chromabits/foundation-pagination
Since Laravel 5.0.7, we can replace the built-in bootstrap presenter this way:
use Chromabits\Pagination\FoundationPresenter;
// To be set in a service provider or wherever
Paginator::presenter(function($paginator)
{
return new FoundationPresenter($paginator);
});
If you wish to replace it manually, you have to instantiate the presenter every time you wish to render pagination:
use App\Models\Post;
use Chromabits\Pagination\FoundationPresenter;
$paginator = Post::query()->paginate();
$html = $paginator->render(new FoundationPresenter($paginator));
For more information on Pagination with Laravel 5, please check out the docs at http://laravel.com/docs/pagination