Files
water_new/config/api.php
2023-03-08 09:16:04 +08:00

49 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
return [
/**
* 重新登录后自动作废以前的token
*/
'token_auto_revoke' => env('TOKEN_AUTO_REVOKE', true),
/**
* token的名称
*/
'passport_token_name' => env('PASSPORT_TOKEN_NAME', ''),
'route' => [
/**
* API 路由命名前缀
*/
'as' => 'api.',
/**
* 可配置 API 独立域名
*/
'domain' => env('API_ROUTE_DOMAIN', ''),
/**
* 不使用用独立域名API 地址前缀
*/
'prefix' => env('API_ROUTE_PREFIX', 'api'),
/**
* API 控制器命名空间
*/
'namespace' => 'App\\Api\\Controllers',
/**
* 中间件
*/
'middleware' => ['api', 'api.accept'],
/**
* 身份认证的中间件
*/
'middleware_auth' => ['api', 'api.accept', 'token.auth'],
/**
* 获取token获取不到也不报错的中间件
*/
'middleware_guess' => ['api', 'api.accept', 'token.guess'],
],
/**
* 接口目录
*/
'directory' => app_path('Api'),
];