PHP code example of desin / result

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

    

desin / result example snippets


$result->setSuccess();
echo $result->getJSON();
exit();

$result->setData([
    "some" => "Some Data",
]);

$result = new \Desin\Result();
$result->setError("При операции произошла ошибка");

echo $result->display();