Skip to content

Commit f60843f

Browse files
committed
merge commit
2 parents e4e3a93 + 5800fc1 commit f60843f

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

README.md

+19-6
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,31 @@ Vue pagination component for use with Bootstrap and Laravel pagination.
44
* [Vue.js](http://vuejs.org/) (tested with 1.0.16).
55
* [Bootstrap CSS](http://getbootstrap.com/) (tested with 3.3.6)
66

7-
All it requires to work is this object and a callback function
7+
#Installation
88

9+
``` npm install vue-laravel-pagination```
10+
11+
```js
12+
13+
// You have to add this package as component to your vuejs installation
14+
Vue.component('pagination', require('vue-laravel-pagination'));
15+
```
16+
17+
#Usage
18+
For making this component to work you need to provide an pagination object with these data members (all required)
919

10-
### Example
1120
```js
1221
pagination: {
13-
total: 0,
14-
per_page: 12,
15-
current_page: 1,
16-
total_pages: 10
22+
total: 0, // total number of elements or items
23+
per_page: 12, // items per page
24+
current_page: 1, // current page (it will be automatically updated when users clicks on some page number).
25+
total_pages: 10 // total pages in record
1726
}
27+
1828
```
29+
Note that you must set ```current_page``` to 1 initially.
30+
31+
### Example
1932

2033
```html
2134

0 commit comments

Comments
 (0)