Skip to content

Commit 2bbf957

Browse files
committed
Add minified ajax docs.
1 parent dc35856 commit 2bbf957

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

documentation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
- [Columns](/docs/{{package}}/{{version}}/html-builder-column)
7070
- [Macro](/docs/{{package}}/{{version}}/html-builder-macro)
7171
- [Ajax](/docs/{{package}}/{{version}}/html-builder-ajax)
72+
- [Minified Ajax](/docs/{{package}}/{{version}}/html-builder-minified-ajax)
7273
- [Parameters](/docs/{{package}}/{{version}}/html-builder-parameters)
7374
- [Events/Callbacks](/docs/{{package}}/{{version}}/html-builder-callbacks)
7475
- [Add Action](/docs/{{package}}/{{version}}/html-builder-action)

html-builder-minified-ajax.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Html Builder Minified Ajax
2+
3+
Ajax is an option that you set to tell `dataTable` where to fetch it's data.
4+
But unlike the regular ajax method, `minifiedAjax` minifies the url generated by dataTables by removing any unnecessary query parameters thus shortening the url
5+
from approx 1500 url length down to 500.
6+
Shortening the URL will help us prevent any browser and development issues concerning the URL length existing the max allowed value.
7+
8+
9+
**Syntax**
10+
```php
11+
$builder->minifiedAjax($url, $script = '', $data = []);
12+
```
13+
14+
## Ajax Parameters
15+
`$url` is the url where we will fetch our json data.
16+
`$script` any vanilla javascript to be included on `data` method of ajax.
17+
`$data` is an array of values to be appended on server request.
18+
19+
```php
20+
$builder->minifiedAjax('', null, ['foo' => 'bar'])
21+
```
22+
23+

0 commit comments

Comments
 (0)