Skip to content

Commit

Permalink
文档优化
Browse files Browse the repository at this point in the history
  • Loading branch information
shuqingzai committed Aug 2, 2020
1 parent 9ab8b70 commit 0982897
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ dump($kd->get('result.list'));

## Laravel 应用

1.`config/app.php` 注册 **ServiceProvider****Facade** ( `Laravel 5.5 +` 无需手动注册)
### 注册服务

`config/app.php` 注册 **ServiceProvider****Facade** ( `Laravel 5.5 +` 无需手动注册,可跳过此步)

```php
'providers' => [
Expand All @@ -319,36 +321,36 @@ dump($kd->get('result.list'));
],
```

2. 创建配置文件:
### 发布配置文件

```shell
```php
php artisan vendor:publish --provider="Overbeck\Logistics\Laravel\ServiceProvider"
```

3. 修改应用根目录下的 `config/logistics.php` 中对应的参数即可。

4. 门面类是 `Overbeck\Logistics\Laravel\Logistics`

示例

```php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Overbeck\Logistics\Laravel\Logistics;
class LogisticsController extends Controller
{
public function query(Request $request)
{
dd(Logistics::query($request->route('code'), $request->input('company')));
}
}
```

修改应用根目录下的 `config/logistics.php` 中对应的参数即可。

### 门面

**门面类是 `Overbeck\Logistics\Laravel\Logistics`**

示例

```php
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Overbeck\Logistics\Laravel\Logistics;

class LogisticsController extends Controller
{
public function query(Request $request)
{
dd(Logistics::query($request->route('code'), $request->input('company')));
}
}
```


## 参考
Expand Down

0 comments on commit 0982897

Please sign in to comment.