Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
add materialize simple + read update
Browse files Browse the repository at this point in the history
  • Loading branch information
liorocks committed May 25, 2015
1 parent 4607dc1 commit 3e0c8df
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

[Laravel 5](http://laravel.com/) comes with [Pagination](http://laravel.com/docs/5.0/pagination) class, which is perfectly rendered to match [Bootstrap 3](http://getbootstrap.com/components/#pagination) styles.

This package gives you ability to change the display output of rendered pagination elements for Front-end Frameworks, such as: [Semantic UI](http://semantic-ui.com/collections/menu.html#pagination), [Zurb Foundation](http://foundation.zurb.com/docs/components/pagination.html) and [UIKit](http://getuikit.com/docs/pagination.html).
This package gives you ability to change the display output of rendered pagination elements for Front-end Frameworks, such as: [Semantic UI](http://semantic-ui.com/collections/menu.html#pagination), [Zurb Foundation](http://foundation.zurb.com/docs/components/pagination.html), [UIKit](http://getuikit.com/docs/pagination.html) and [Materialize](http://materializecss.com/).

With this package it is also very easy to [create custom pagination](#create-custom-pagination) HTML output.

Expand Down Expand Up @@ -69,6 +69,14 @@ For [UIKit](http://getuikit.com/):
{!! (new Landish\Pagination\Simple\UIKit($items))->render() !!}
```

For [Materialize](http://materializecss.com/) (Contributed by [@arandilopez](https://github.com/arandilopez)):

```php
{!! (new Landish\Pagination\Materialize($items))->render() !!}
// or add "\Simple" in namespace for "Simple Pagination"
{!! (new Landish\Pagination\Simple\Materialize($items))->render() !!}
```

## Usage - Recommended Way

If you display pagination on several pages of your web application and have to write to the output code in several files, then this is, what I would recommend to do:
Expand Down
18 changes: 18 additions & 0 deletions src/Simple/Materialize.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php namespace Landish\Pagination\Simple;

use Illuminate\Contracts\Pagination\Paginator as PaginatorContract;
use Landish\Pagination\Materialize as MaterializePresenter;

class Materialize extends MaterializePresenter {

/**
* Create a simple Pagination presenter.
*
* @param \Illuminate\Contracts\Pagination\Paginator $paginator
*/
public function __construct(PaginatorContract $paginator)
{
$this->paginator = $paginator;
}

}

0 comments on commit 3e0c8df

Please sign in to comment.