Skip to content


Available methods:


Sets the value in HX-Push-Url header. Pushes a new url into the history stack.



Sets the value in HX-Replace-Url header. Replaces the current URL in the location bar.



Sets the value in HX-Reswap header. Allows you to specify how the response will be swapped. See hx-swap for possible values.

$this->response->setReswap('innerHTML show:#another-div:top');


Sets the value in HX-Retarget header. A CSS selector that updates the target of the content update to a different element on the page.



Sets the value in HX-Reselect header. A CSS selector that allows you to choose which part of the response is used to be swapped in. Overrides an existing hx-select on the triggering element.



Allows you to set the headers: HX-Trigger, HX-Trigger-After-Settle or HX-Trigger-After-Swap.

This method has 3 parameters: * name * params * method - which can be one of: receive (default), settle, swap.

$this->response->triggerClientEvent('showMessage', ['level' => 'info', 'message' => 'Here Is A Message']);

For more information, please see hx-trigger.