-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sanjingshou
committed
Jun 3, 2019
1 parent
beecd35
commit ad1677a
Showing
4 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# laravel-pdd | ||
|
||
微信 SDK for Laravel 5 , 基于 [observer/pdd](https://github.com/Observer5/pdd) | ||
|
||
|
||
|
||
## 框架要求 | ||
|
||
Laravel5 | ||
|
||
## 安装 | ||
|
||
```shell | ||
composer require "overtrue/laravel-wechat:~1.0" | ||
``` | ||
|
||
## 配置 | ||
|
||
### Laravel 应用 | ||
|
||
1. 在 `config/app.php` 注册 ServiceProvider 和 Facade (Laravel 5.5 + 无需手动注册) | ||
|
||
```php | ||
'providers' => [ | ||
// ... | ||
Observer\LaravelPdd\ServiceProvider::class, | ||
], | ||
'aliases' => [ | ||
// ... | ||
'EasyPdd' => Observer\LaravelPdd\Facade::class, | ||
], | ||
``` | ||
|
||
2. 创建配置文件: | ||
|
||
```shell | ||
php artisan vendor:publish --provider="Observer\LaravelPdd\ServiceProvider" | ||
``` | ||
|
||
3. 修改应用根目录下的 `config/pdd.php` 中对应的参数即可。 | ||
|
||
|
||
## License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
<?php | ||
|
||
return [ | ||
/* | ||
* 默认配置,将会合并到各模块中 | ||
*/ | ||
'defaults' => [ | ||
|
||
'log' => [ | ||
'level' => env('PDD_LOG_LEVEL', 'debug'), | ||
'file' => env('PDD_LOG_FILE', storage_path('logs/wechat.log')), | ||
], | ||
|
||
'client_id' => env('PDD_CLIENT_ID', 'your-client_id'), // ClientID | ||
'client_secret' => env('PDD_CLIENT_SECRET', 'your-client_secret'), // ClientSecret | ||
|
||
'oauth' => [ | ||
'callback' => env('PDD_OFFICIAL_ACCOUNT_OAUTH_CALLBACK', '/examples/oauth_callback.php'), | ||
'member_type' => 'MERCHANT', | ||
] | ||
]; |