PHP code example of amol / reactiveci4

1. Go to this page and download the library: Download amol/reactiveci4 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

amol / reactiveci4 example snippets


helper('reactive');
reactive($user, "You updated the profile");

use Amol\ReactiveCi4\Reactive;

$userModel = model('App\Models\UserModel');
$user = $userModel->find(1);
$properties = [
    "ip" => "127.0.0.1"
];
$label = "profile review"

$record = new Reactive();
$record->log($user, "admin changed user's profile photo", $admin, $properties, $label);

public function log(object $subject, string $text, object $causer=null,array $properties=[], string $label=null ): id|false

function reactive(object $subject, string $text, object $causer=null,array $properties=[], string $label=null )
bash
php spark reactive:setup