ConfigProvider.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of qbhy/hyperf-auth.
  5. *
  6. * @link https://github.com/qbhy/hyperf-auth
  7. * @document https://github.com/qbhy/hyperf-auth/blob/master/README.md
  8. * @contact qbhy0715@qq.com
  9. * @license https://github.com/qbhy/hyperf-auth/blob/master/LICENSE
  10. */
  11. namespace Qbhy\HyperfAuth;
  12. class ConfigProvider
  13. {
  14. public function __invoke(): array
  15. {
  16. return [
  17. 'dependencies' => [
  18. ],
  19. 'commands' => [
  20. ],
  21. 'annotations' => [
  22. 'scan' => [
  23. 'paths' => [
  24. __DIR__,
  25. ],
  26. 'ignore_annotations' => [
  27. 'mixin',
  28. ],
  29. ],
  30. ],
  31. 'publish' => [
  32. [
  33. 'id' => 'auth',
  34. 'description' => 'auth 组件配置.', // 描述
  35. // 建议默认配置放在 publish 文件夹中,文件命名和组件名称相同
  36. 'source' => __DIR__ . '/../publish/auth.php', // 对应的配置文件路径
  37. 'destination' => BASE_PATH . '/config/autoload/auth.php', // 复制为这个路径下的该文件
  38. ],
  39. ],
  40. ];
  41. }
  42. }