Skip to content

Latest commit

 

History

History
104 lines (72 loc) · 4.28 KB

README_EN.md

File metadata and controls

104 lines (72 loc) · 4.28 KB

Wechat

May be the most beautiful Wechat SDK till now.Laravel 5 extension package: overtrue/laravel-wechat

We discuss @ QQ Group:319502940. Welcome to join us! ^^

Build Status Latest Stable Version Latest Unstable Version Build Status Scrutinizer Code Quality Total Downloads License

There are lots of Wechat SDKs around world, but no one can satisfied me, cause I want a SDK has the advantage below:

  • Well organized & clear named classes & files;
  • Hide the detail things developer needn't know;
  • Beautiful method usage;
  • Customized cached method;
  • Meet PSR-4 standard;
  • Highly abstracted Message class, avoid to merge json & xml;

Installation

Requirement:PHP >= 5.3.0

  1. use composer
composer require "overtrue/wechat:~2.0.*"
  1. Manually

Download zip or use the version you want:https://github.com/overtrue/wechat/releases

then use the autoload.php file in the package root folder:

<?php

require "wechat/autoload.php"; // 路径请修改为你具体的实际路径

...

Usage

Basic Usage(Server Side):

<?php

use Overtrue\Wechat\Server;

$appId          = 'wx3cf0f39249eb0e60';

$server = new Server($appId);

$server->on('message', function($message){
    return "Hello! Welcome to see overtrue!";
});

// You can either echo or return 
echo $server->serve();

See more usage in Wiki.

Documentation

Wiki

I highly recommended that you should read the Wechat's official documents first.

Features

Contributing

PR is warmly welcomed,please follow the PSR standard Thank you!

License

MIT