PHP code example of kharanenka / php-result-store
1. Go to this page and download the library: Download kharanenka/php-result-store 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/ */
kharanenka / php-result-store example snippets
//Result array
[
'status' => false/true
'data' => object
'message' => 'Message text',
'code' => 1015,
]
//Example 1
Result::setMessage('Error')->setCode(400)->setFalse();
...
if(!Result::status()) {
return Result::get();
}
//Example 2
return Result::setTrue($obData)->getJSON();
"kharanenka/php-result-store": "2.2.*"