PHP code example of neography7 / easy-response

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

    

neography7 / easy-response example snippets


easySuccess( message, title = null, data = null);

easySuccess(
    message: 'Test message',
    title: 'Test Title',
    data: [
        "key" => "value"
    ]
);

easySuccess('Test message', 'Test Title', [ "key" => "value" ]);

easyError( message, title = null, code = null, data = null);

easyError(
    message: 'Test message',
    title: 'Test Title',
    code: 400,
    data: [
        "key" => "value"
    ]
);

easyError('Test message', 'Test Title', 400, [ "key" => "value" ]);

$callback->removeKey("key");
bash
php vendor/bin/testbench package:test