PHPackages                             nkondrashov/yii3-htmx - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. nkondrashov/yii3-htmx

ActiveLibrary[Framework](/categories/framework)

nkondrashov/yii3-htmx
=====================

htmx extension for Yii Framework

0.2(2y ago)311BSD-3-ClausePHPPHP ^8.1

Since Feb 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/nkondrashov/yii3-htmx)[ Packagist](https://packagist.org/packages/nkondrashov/yii3-htmx)[ RSS](/packages/nkondrashov-yii3-htmx/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

 [ ![](https://camo.githubusercontent.com/8317c17418b39410a660f5149071d26c5023c0d5fb2b7ebb771324812f666d73/68747470733a2f2f796969736f66742e6769746875622e696f2f646f63732f696d616765732f7969695f6c6f676f2e737667) ](https://github.com/yiisoft) [ ![](https://raw.githubusercontent.com/bigskysoftware/htmx/master/www/static/img/htmx_logo.1.png) ](https://htmx.org/)

Yii3 Framework htmx simple extension
====================================

[](#yii3-framework-htmx-simple-extension)

This [Yii Framework](http://www.yiiframework.com/) extension encapsulates basic functions \[htmx\] and makes using in Yii applications extremely easy.

You can see examples in [yii3-demo-htmx](https://github.com/nkondrashov/yii3-demo-htmx) application.

Installation
------------

[](#installation)

1. The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

```
php composer.phar require nkondrashov/yii3-htmx "^0.2"

```

2. Add `HTMXMiddleware.php` to router.

```
->middleware(HTMXMiddleware::class)
```

3. Register asset in main layout or `AppAsset`

```
$assetManager->register(HTMXAsset::class);
```

Warning!
--------

[](#warning)

4. Add to `` tag attribute `hx-headers='{"X-CSRF-Token":""}'` for success post requests. Like this:

```
