PHP code example of xidiankeji / pinduoduo-sdk

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

    

xidiankeji / pinduoduo-sdk example snippets




namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Pinduoduo;
use Xidiankeji\Pinduoduo\Request\DdkGoodsDetailRequest;

class IndexController extends Controller
{
    public function index()
    {
        $request = new DdkGoodsDetailRequest();
        $request->setGoodsIdList('[1016692240]');
        $result = Pinduoduo::excute($request);
        dd($result);
    }
}

shell
$ php artisan vendor:publish