PHPackages                             alexbusu/php-js - 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. alexbusu/php-js

ActiveLibrary

alexbusu/php-js
===============

Micro-framework which translates PHP-defined actions in browser using jQuery

4.0.0(9mo ago)0535↓100%MITPHPPHP ^8.1CI passing

Since Dec 3Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/alexbusu/php-js)[ Packagist](https://packagist.org/packages/alexbusu/php-js)[ RSS](/packages/alexbusu-php-js/feed)WikiDiscussions master Synced 1mo ago

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

php-js
======

[](#php-js)

A micro-framework for translating PHP-defined actions into browser actions using jQuery. This library allows you to send commands (we call them "triggers") from your PHP backend to your JavaScript frontend.

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

[](#installation)

The recommended way to install this library is through [Composer](https://getcomposer.org/).

```
composer require alexbusu/php-js
```

Usage
-----

[](#usage)

### PHP Backend

[](#php-backend)

First, you need to create a `Phpjs` response object in your PHP code. You can then add triggers to this object.

```
