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

Commit 3e0c8df

Browse files
committed
add materialize simple + read update
1 parent 4607dc1 commit 3e0c8df

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
[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.
1010

11-
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).
11+
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/).
1212

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

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

72+
For [Materialize](http://materializecss.com/) (Contributed by [@arandilopez](https://github.com/arandilopez)):
73+
74+
```php
75+
{!! (new Landish\Pagination\Materialize($items))->render() !!}
76+
// or add "\Simple" in namespace for "Simple Pagination"
77+
{!! (new Landish\Pagination\Simple\Materialize($items))->render() !!}
78+
```
79+
7280
## Usage - Recommended Way
7381

7482
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:

src/Simple/Materialize.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php namespace Landish\Pagination\Simple;
2+
3+
use Illuminate\Contracts\Pagination\Paginator as PaginatorContract;
4+
use Landish\Pagination\Materialize as MaterializePresenter;
5+
6+
class Materialize extends MaterializePresenter {
7+
8+
/**
9+
* Create a simple Pagination presenter.
10+
*
11+
* @param \Illuminate\Contracts\Pagination\Paginator $paginator
12+
*/
13+
public function __construct(PaginatorContract $paginator)
14+
{
15+
$this->paginator = $paginator;
16+
}
17+
18+
}

0 commit comments

Comments
 (0)