1. Go to this page and download the library: Download beaplat/traffic 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/ */
beaplat / traffic example snippets
// 一定要用 post 方法
// 一定要返回 succes 7个字符串
Route::post('traffic/callback', function () {
$res = file_get_contents("php://input");
Log::useFiles(storage_path('logs/traffic.log'));
Log::info($res);
return 'success';
});