Skip to content

AJAX

config/ajax.php

The ajax configuration file contains all actions you want to register

For a more detailed guide, please refer to the AJAX section in the advanced guide.

If you want to enable your ajax routes, set this to true

config/ajax.php
<?php
return [
'enabled' => true,
];

To register an action, you need to add a new entry to the actions array. The key is the name of the action, the available options can be found below.

config/ajax.php
use App\AJAX\Actions\Example;
return [
'actions' => [
'my_action' => [
'class' => new Example,
],
],
];
KeyDescription
classThe class that contains the action