Merge branch 'master' of git.int.haowumc.com:arch/php-auth-client
This commit is contained in:
commit
ebaae507a4
11
README.md
11
README.md
|
@ -14,14 +14,17 @@ composer require arch/php-auth-client
|
||||||
|
|
||||||
### 代码中启用
|
### 代码中启用
|
||||||
|
|
||||||
注册中间件
|
* 注册中间件
|
||||||
```PHP
|
|
||||||
|
```php
|
||||||
$app->routeMiddleware([
|
$app->routeMiddleware([
|
||||||
'auth' => PdAuth\Middleware\Authenticate::class,
|
'auth' => PdAuth\Middleware\Authenticate::class,
|
||||||
]);
|
]);
|
||||||
```
|
```
|
||||||
注册服务
|
|
||||||
```PHP
|
* 注册服务
|
||||||
|
|
||||||
|
```php
|
||||||
$app->register(PdAuth\PdAuthServiceProvider::class);
|
$app->register(PdAuth\PdAuthServiceProvider::class);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user