PHP code example of ryuuzakixp / php-wehelp-url-generator

1. Go to this page and download the library: Download ryuuzakixp/php-wehelp-url-generator 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/ */

    

ryuuzakixp / php-wehelp-url-generator example snippets


    use WeHelpUrlGenerator\SurveyLink;

    $encryptKey = 'xxxx';

    $url = SurveyLink::generate([
        'code' => 'xxx',
        'experience_id' => 'xxxx', 
        'experience_date' => 'xxx',//Y-m-d H:i:s
        'company_unit_code' => 'xxxx', 
        'person' => [
            'name' => 'xxxx', 
            'internal_code' => 'xxxxx', 
            'type' => 'xxxxx',//CUSTOMER,COLLABORATOR
            'company_unit_code' => 'xxx'
        ]
    ], $encryptKey);

    use WeHelpUrlGenerator\SurveyLink;

    $encryptKey = 'xxxx';

    $url = SurveyLink::generate([
        'code' => 'xxx',
        'experience_id' => 'xxxx', 
        'experience_date' => 'xxx',//Y-m-d H:i:s
        'company_unit_code' => 'xxxx', 
        'person' => [
            'name' => 'xxxx', 
            'internal_code' => 'xxxxx', 
            'type' => 'xxxxx',//CUSTOMER,COLLABORATOR
            'company_unit_code' => 'xxx',
            'created_at' => '2022-10-10',
            'date_of_birth' => '1988-07-06',
            'language' => 'PORTUGUESE', //PORTUGUESE,SPANISH,ENGLISH
            'email' => 'xxxxxx',
            'phone' => 'xxxxx',
        ],
        'cf' => [
            11 => 'xxxxx', //ID Custom field => value
            12 => 'xxxxx' //ID Custom field => value
        ]
    ], $encryptKey);