Update README.md
This commit is contained in:
parent
f7e84885bc
commit
e3cfc7e43b
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