PHP code example of yisonli / laravel-helper
1. Go to this page and download the library: Download yisonli/laravel-helper 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/ */
yisonli / laravel-helper example snippets
.
├── README.md
├── composer.json
└── src
├── Crypt
│ ├── AES.php
│ ├── RSA.php
│ └── Sign.php
├── Curl
│ ├── Get.php
│ ├── Post.php
│ ├── PostJson.php
│ ├── ResCode.php
│ └── Response.php
├── Log
│ ├── MonitorLog.php
│ └── Sensitive.php
└── Misc
├── ArrayHelper.php
├── Datas.php
├── Identity.php
├── Timestamp.php
└── Verify.php
$aes = new AES($token);
$encrypted = $aes->encrypt($string);
$decrypted = $aes->decrypt($encrypted);
$result = Get::run($url, $params, true);
$result = Post::run($url, $params, true);
$result = PostJson::run($url, $params, true);
return Response::success($data, $header, $isHump);
return Response::error(array_merge(ResCode::ERR_LACK_PARAM, ['data'=>$errorMsg]));
return Response::fail(ResCode::ERR_THIRD_API_FAIL, 'something wrong.');
MonitorLog::getInstance()->error($msg, $content);
MonitorLog::getInstance()->warn($msg, $content);
MonitorLog::getInstance()->info($msg, $content);
$res_data = Sensitive::filter($data);
$string = Datas::lineToHump($string);
$string = Datas::humpToLine($string);
$result = Datas::arrayToHump($result);
$result = Datas::arrayToLine($result);