PHP code example of vaibhavpandeyvpz / soochak

1. Go to this page and download the library: Download vaibhavpandeyvpz/soochak 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/ */

    

vaibhavpandeyvpz / soochak example snippets




$em = new Soochak\EventManager();

// Attach a callback to 'login.success' event
$em->attach('login.success', function ($event) {
    /**
     * Perform your event logic like sending notification email
     * You can optionally stop an event from further propagation.
     */
    $event->stopPropagation(true);
});

// Anywhere in your app, trigger 'login.success' event
$em->trigger('login.success');