text4u

api.php 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | API
  6. |--------------------------------------------------------------------------
  7. |
  8. | Whether the API should be enabled, and through what route. You
  9. | can enable or disable the whole API, and expose individual
  10. | resources per environment, depending on your site needs.
  11. |
  12. | https://statamic.dev/content-api#enable-the-api
  13. |
  14. */
  15. 'enabled' => env('STATAMIC_API_ENABLED', false),
  16. 'resources' => [
  17. 'collections' => false,
  18. 'navs' => false,
  19. 'taxonomies' => false,
  20. 'assets' => false,
  21. 'globals' => false,
  22. 'forms' => false,
  23. 'users' => false,
  24. ],
  25. 'route' => env('STATAMIC_API_ROUTE', 'api'),
  26. /*
  27. |--------------------------------------------------------------------------
  28. | Middleware & Authentication
  29. |--------------------------------------------------------------------------
  30. |
  31. | Define the middleware / middleware group that will be applied to the
  32. | API route group. If you want to externally expose this API, here
  33. | you can configure a middleware based authentication layer.
  34. |
  35. */
  36. 'middleware' => env('STATAMIC_API_MIDDLEWARE', 'api'),
  37. /*
  38. |--------------------------------------------------------------------------
  39. | Pagination
  40. |--------------------------------------------------------------------------
  41. |
  42. | The numbers of items to show on each paginated page.
  43. |
  44. */
  45. 'pagination_size' => 50,
  46. /*
  47. |--------------------------------------------------------------------------
  48. | Caching
  49. |--------------------------------------------------------------------------
  50. |
  51. | By default, Statamic will cache each endpoint until the specified
  52. | expiry, or until content is changed. See the documentation for
  53. | more details on how to customize your cache implementation.
  54. |
  55. | https://statamic.dev/content-api#caching
  56. |
  57. */
  58. 'cache' => [
  59. 'expiry' => 60,
  60. ],
  61. /*
  62. |--------------------------------------------------------------------------
  63. | Exclude Keys
  64. |--------------------------------------------------------------------------
  65. |
  66. | Here you may provide an array of keys to be excluded from API responses.
  67. | For example, you may want to hide things like edit_url, api_url, etc.
  68. |
  69. */
  70. 'excluded_keys' => [
  71. //
  72. ],
  73. ];