Skip to content

Commit cff14d7

Browse files
update doc
1 parent b255345 commit cff14d7

File tree

5 files changed

+57
-33
lines changed

5 files changed

+57
-33
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,21 @@
1010
<img src="art/intro-image.png" alt="laravel-vue-datatable intro image">
1111
</p>
1212

13-
**if you want to make dataTable easy and quickly with crazy features, this package is for you.**
14-
15-
These two Laravel packages are for making easy and quickly dataTable for your work, the goal is creating Datatable an easy way using ajax,
16-
with interesting features, just with little steps, you can create it
13+
**if you want to create DataTable easy and quickly with crazy features, this package is for you.**
14+
15+
These two Laravel packages are for making easy and quickly DataTable for your work with several features like:
16+
- Searching
17+
- Sorting
18+
- Add new relations
19+
- Multiple selection
20+
- Delete/Delete all
21+
- Restructing data
22+
- Permession access
23+
-Response notifications for events
24+
- Pagination.
25+
26+
The goal is to create Datatable in easy way using ajax,
27+
with interesting features, just with little steps, you can create it
1728

1829

1930

_docs/1-introduction.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,21 @@
1111
<img src="../art/intro-image.png" alt="laravel-vue-datatable intro image">
1212
</p>
1313

14-
**if you want to make dataTable easy and quickly with crazy features, this package is for you.**
15-
16-
These two Laravel packages are for making easy and quickly dataTable for your work, the goal is creating Datatable an easy way using ajax,
17-
with interesting features, just with little steps, you can create it
14+
**if you want to create DataTable easy and quickly with crazy features, this package is for you.**
15+
16+
These two Laravel packages are for making easy and quickly DataTable for your work with several features like:
17+
- Searching
18+
- Sorting
19+
- Add new relations
20+
- Multiple selection
21+
- Delete/Delete all
22+
- Restructing data
23+
- Permession access
24+
-Response notifications for events
25+
- Pagination.
26+
27+
The goal is to create Datatable in easy way using ajax,
28+
with interesting features, just with little steps, you can create it
1829

1930
## Demo
2031

_docs/2-Installation-and-Setup.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
## Requirements
1212

1313
* [Vue.js](https://vuejs.org/) => 2.x
14-
* [Laravel](http://laravel.com/docs/) => 7.x
15-
* [Tailwind](https://tailwindcss.com/) => 1.*
14+
* [Laravel](http://laravel.com/docs/) => 8.x
15+
* [Tailwind](https://tailwindcss.com/) => 3.*
1616

1717

1818
## Installation
1919

2020

21-
for install and setup them we will work on the server-side and client-side , using few steps
21+
To install and setup the packages we will work on the server-side and the client-side , using a few steps:
2222
## server side
2323

2424
#### step 1
@@ -32,7 +32,7 @@ create grid class
3232
php artisan make:grid-class exampleGrid
3333
```
3434

35-
## clint side
35+
## client side
3636

3737
#### step 1
3838
```bash

_docs/3-Configuration.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
| `url ` | String | "/" | (required) json data url |
4040
| `toolbar` | Object | {} | to setup toolbar |
4141
| `toolbar.show` | Bool | true | to disable or enable toolbar |
42-
| `toolbar.delete` | Object | {} | to add delete all option to toolbar |
43-
| `toolbar.delete.url` | String | '/' | to set delete all url |
42+
| `toolbar.delete` | Object | {} | to add "delete all" option to toolbar |
43+
| `toolbar.delete.url` | String | '/' | to set "delete all" url |
4444
| `toolbar.delete.show` | Bool | true | to disable or enable delete button |
4545
| `search` | Object | {} | to setup search input |
4646
| `search.show` | Bool | true | disable or enable the feature |
@@ -75,7 +75,8 @@
7575
:filters="{
7676
selection:{
7777
show: true,
78-
data:[
78+
data:[
79+
// you can add here more than one section filter
7980
{
8081
label: 'Admins',
8182
relation: 'createdBy',
@@ -130,7 +131,7 @@
130131
| --- | --- | --- | --- |
131132
| `label ` | String | '' | table column head name |
132133
| `column` | String | '' | database column name |
133-
| `show` | Bool | true | to add toolbar config |
134+
| `show` | Bool | true | disable or enable column |
134135
| `sort` | Object | {} | is responsible for sort column |
135136
| `sort.sortable` | Bool | true | disable or enable sorting |
136137
| `sort.sortColumn` | String | '' | column name for sorting |

_docs/4-Usage.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
3. [Configuration](3-Configuration.md)
66
4. [Usage](4-Usage.md)
77
* [Basic Usage](#Basic-Usage)
8-
* [relation include](#relation-include)
8+
* [add a relation](#add-a-relation)
99
* [Searching](#Searching)
1010
* [Sorting](#Sorting)
1111
* [Selection filter](#Selection-filter-for-relations)
@@ -134,7 +134,7 @@ use the data-table component in your blade
134134

135135
```
136136

137-
## relation include
137+
## add a relation
138138

139139
### **server side**
140140

@@ -178,7 +178,7 @@ add relation column to columns prop
178178

179179
### **server side**
180180

181-
to start using search input we will specific columns we want to search within by default search column will be ``id``
181+
To start using search input we need to specify columns we want to search through, by default search column will be ```id```
182182

183183
add ``` $searchColumns``` property to start use search feature
184184

@@ -194,7 +194,7 @@ add ``` $searchColumns``` property to start use search feature
194194

195195
to use the sort feature we will add a sort object
196196

197-
there is 3 property inside sort
197+
there ar 3 property inside sort
198198

199199
1- ````sort.sortable```` : if you want to use a column for sorting
200200

@@ -249,8 +249,7 @@ to use rows count per page we need to use ````perPage```` prop
249249

250250
### **client side**
251251

252-
to add select input for relation column you will add filters prop as below
253-
```selection``` the object contains all filter selection data
252+
to add select input for relation column you will add filters prop as below , the ```selection``` object contains all filter selection data
254253

255254
````show```` to disable or enable selection filter
256255

@@ -289,16 +288,16 @@ to add select input for relation column you will add filters prop as below
289288
## Data mapping
290289
### **server side**
291290

292-
if you would to restructure data we provide this method for you
291+
if you would to restructure data, we provide this method for you
293292

294-
in first we will add ```$isMapping``` property equal true
293+
in first, we will add ```$isMapping``` property equal true
295294
```php
296295
// app/DataGrid/PostGrid.php
297296

298297
protected $isMapping = true;
299298
```
300-
after that, we will add this method is contains callback
301-
function return array contain our collection
299+
after that, we will add this method that contains callback
300+
function return array contain our collection
302301
```php
303302
// app/DataGrid/PostGrid.php
304303

@@ -321,8 +320,10 @@ function return array contain our collection
321320

322321
### **server side**
323322

324-
to add action buttons to rows we will use an action array to do that
325-
we can add associative array to action array with two value button structure and visibility true or false
323+
To add action buttons to rows we will use an action array to do that, we can add associative array
324+
to action array with two value:
325+
- button structure
326+
- visibility true or false.
326327

327328
```php
328329
// app/DataGrid/PostGrid.php
@@ -349,8 +350,8 @@ we can add associative array to action array with two value button structure and
349350

350351
### **server side**
351352

352-
to use delete action just we can insert our delete button and add
353-
```delete```class to Html tag and ```data-path``` attribute include path to delete element As shown below
353+
To use delete action we can just insert our delete button and add ```delete``` class
354+
to Html tag and ```data-path``` attribute include path to delete element As shown below
354355
```php
355356
// app/DataGrid/PostGrid.php
356357

@@ -379,7 +380,7 @@ to use delete action just we can insert our delete button and add
379380

380381
### **client side**
381382

382-
inside toolbar object will add url property contain our delete all route
383+
inside toolbar object we will add url property contains our 'delete all' route
383384
```html
384385
// resources/posts/index.blade.php
385386

@@ -397,8 +398,8 @@ inside toolbar object will add url property contain our delete all route
397398
```
398399

399400
### **server side**
400-
in server-side will receive request containing ids
401-
after that do our delete mission
401+
in server-side we will receive request containing ids list,
402+
after that we will do our delete mission
402403
```php
403404

404405
public function destroyAll(Request $request){

0 commit comments

Comments
 (0)