File tree 1 file changed +19
-6
lines changed
1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,31 @@ Vue pagination component for use with Bootstrap and Laravel pagination.
4
4
* [ Vue.js] ( http://vuejs.org/ ) (tested with 1.0.16).
5
5
* [ Bootstrap CSS] ( http://getbootstrap.com/ ) (tested with 3.3.6)
6
6
7
- All it requires to work is this object and a callback function
7
+ #Installation
8
8
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)
9
19
10
- ### Example
11
20
``` js
12
21
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
17
26
}
27
+
18
28
```
29
+ Note that you must set ``` current_page ``` to 1 initially.
30
+
31
+ ### Example
19
32
20
33
``` html
21
34
You can’t perform that action at this time.
0 commit comments