Skip to content

Commit 8d3c70a

Browse files
authored
Update README.md
1 parent 88f6e61 commit 8d3c70a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,10 @@ For example if you are in /pages/index but you et date from /pages/list, is usef
324324
# Indicate specific type for ajax call
325325
You can specify on config "ajaxType" if would that ajax calls are GET or POST, for example
326326
```php
327-
<?= $this->Datatable->getInstance()->setConfig('ajaxType', 'POST'); ?>
327+
<?php
328+
$this->Datatable->getInstance()->setConfig('ajaxType', 'POST');
329+
$this->Datatable->getInstance()->setConfig('csrfToken', $this->getRequest()->getAttribute("csrfToken"));
330+
?>
328331
```
329332
Important: if you set POST you must set "unlockedActions" on Security Component, specify the target action in the controller's initialize function
330333
```php

0 commit comments

Comments
 (0)