filesystems.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /*
  3. * This file is part of the Jiannei/lumen-api-starter.
  4. *
  5. * (c) Jiannei <longjian.huang@foxmail.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. return [
  11. /*
  12. |--------------------------------------------------------------------------
  13. | Default Filesystem Disk
  14. |--------------------------------------------------------------------------
  15. |
  16. | Here you may specify the default filesystem disk that should be used
  17. | by the framework. The "local" disk, as well as a variety of cloud
  18. | based disks are available to your application. Just store away!
  19. |
  20. */
  21. 'default' => env('FILESYSTEM_DRIVER', 'local'),
  22. /*
  23. |--------------------------------------------------------------------------
  24. | Default Cloud Filesystem Disk
  25. |--------------------------------------------------------------------------
  26. |
  27. | Many applications store files both locally and in the cloud. For this
  28. | reason, you may specify a default "cloud" driver here. This driver
  29. | will be bound as the Cloud disk implementation in the container.
  30. |
  31. */
  32. 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
  33. /*
  34. |--------------------------------------------------------------------------
  35. | Filesystem Disks
  36. |--------------------------------------------------------------------------
  37. |
  38. | Here you may configure as many filesystem "disks" as you wish, and you
  39. | may even configure multiple disks of the same driver. Defaults have
  40. | been setup for each driver as an example of the required options.
  41. |
  42. | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
  43. |
  44. */
  45. 'disks' => [
  46. 'local' => [
  47. 'driver' => 'local',
  48. 'root' => storage_path('app'),
  49. ],
  50. 'public' => [
  51. 'driver' => 'local',
  52. 'root' => storage_path('app/public'),
  53. 'url' => env('APP_URL').'/storage',
  54. 'visibility' => 'public',
  55. ],
  56. 's3' => [
  57. 'driver' => 's3',
  58. 'key' => env('AWS_ACCESS_KEY_ID'),
  59. 'secret' => env('AWS_SECRET_ACCESS_KEY'),
  60. 'region' => env('AWS_DEFAULT_REGION'),
  61. 'bucket' => env('AWS_BUCKET'),
  62. 'url' => env('AWS_URL'),
  63. 'endpoint' => env('AWS_ENDPOINT'),
  64. ],
  65. ],
  66. ];