telescope.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <?php
  2. use Laravel\Telescope\Http\Middleware\Authorize;
  3. use Laravel\Telescope\Watchers;
  4. return [
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Telescope Domain
  8. |--------------------------------------------------------------------------
  9. |
  10. | This is the subdomain where Telescope will be accessible from. If the
  11. | setting is null, Telescope will reside under the same domain as the
  12. | application. Otherwise, this value will be used as the subdomain.
  13. |
  14. */
  15. 'domain' => env('TELESCOPE_DOMAIN', null),
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Telescope Path
  19. |--------------------------------------------------------------------------
  20. |
  21. | This is the URI path where Telescope will be accessible from. Feel free
  22. | to change this path to anything you like. Note that the URI will not
  23. | affect the paths of its internal API that aren't exposed to users.
  24. |
  25. */
  26. 'path' => env('TELESCOPE_PATH', 'telescope'),
  27. /*
  28. |--------------------------------------------------------------------------
  29. | Telescope Storage Driver
  30. |--------------------------------------------------------------------------
  31. |
  32. | This configuration options determines the storage driver that will
  33. | be used to store Telescope's data. In addition, you may set any
  34. | custom options as needed by the particular driver you choose.
  35. |
  36. */
  37. 'driver' => env('TELESCOPE_DRIVER', 'database'),
  38. 'storage' => [
  39. 'database' => [
  40. 'connection' => env('DB_CONNECTION', 'mysql'),
  41. 'chunk' => 1000,
  42. ],
  43. ],
  44. /*
  45. |--------------------------------------------------------------------------
  46. | Telescope Master Switch
  47. |--------------------------------------------------------------------------
  48. |
  49. | This option may be used to disable all Telescope watchers regardless
  50. | of their individual configuration, which simply provides a single
  51. | and convenient way to enable or disable Telescope data storage.
  52. |
  53. */
  54. 'enabled' => env('TELESCOPE_ENABLED', true),
  55. /*
  56. |--------------------------------------------------------------------------
  57. | Telescope Route Middleware
  58. |--------------------------------------------------------------------------
  59. |
  60. | These middleware will be assigned to every Telescope route, giving you
  61. | the chance to add your own middleware to this list or change any of
  62. | the existing middleware. Or, you can simply stick with this list.
  63. |
  64. */
  65. 'middleware' => [
  66. 'web',
  67. Authorize::class,
  68. ],
  69. /*
  70. |--------------------------------------------------------------------------
  71. | Allowed / Ignored Paths & Commands
  72. |--------------------------------------------------------------------------
  73. |
  74. | The following array lists the URI paths and Artisan commands that will
  75. | not be watched by Telescope. In addition to this list, some Laravel
  76. | commands, like migrations and queue commands, are always ignored.
  77. |
  78. */
  79. 'only_paths' => [
  80. // 'api/*'
  81. ],
  82. 'ignore_paths' => [
  83. 'nova-api*',
  84. ],
  85. 'ignore_commands' => [
  86. //
  87. ],
  88. /*
  89. |--------------------------------------------------------------------------
  90. | Telescope Watchers
  91. |--------------------------------------------------------------------------
  92. |
  93. | The following array lists the "watchers" that will be registered with
  94. | Telescope. The watchers gather the application's profile data when
  95. | a request or task is executed. Feel free to customize this list.
  96. |
  97. */
  98. 'watchers' => [
  99. Watchers\BatchWatcher::class => env('TELESCOPE_BATCH_WATCHER', true),
  100. Watchers\CacheWatcher::class => [
  101. 'enabled' => env('TELESCOPE_CACHE_WATCHER', true),
  102. 'hidden' => [],
  103. ],
  104. Watchers\ClientRequestWatcher::class => env('TELESCOPE_CLIENT_REQUEST_WATCHER', true),
  105. Watchers\CommandWatcher::class => [
  106. 'enabled' => env('TELESCOPE_COMMAND_WATCHER', true),
  107. 'ignore' => [],
  108. ],
  109. Watchers\DumpWatcher::class => [
  110. 'enabled' => env('TELESCOPE_DUMP_WATCHER', true),
  111. 'always' => env('TELESCOPE_DUMP_WATCHER_ALWAYS', false),
  112. ],
  113. Watchers\EventWatcher::class => [
  114. 'enabled' => env('TELESCOPE_EVENT_WATCHER', true),
  115. 'ignore' => [],
  116. ],
  117. Watchers\ExceptionWatcher::class => env('TELESCOPE_EXCEPTION_WATCHER', true),
  118. Watchers\GateWatcher::class => [
  119. 'enabled' => env('TELESCOPE_GATE_WATCHER', true),
  120. 'ignore_abilities' => [],
  121. 'ignore_packages' => true,
  122. 'ignore_paths' => [],
  123. ],
  124. Watchers\JobWatcher::class => env('TELESCOPE_JOB_WATCHER', true),
  125. Watchers\LogWatcher::class => [
  126. 'enabled' => env('TELESCOPE_LOG_WATCHER', true),
  127. 'level' => 'error',
  128. ],
  129. Watchers\MailWatcher::class => env('TELESCOPE_MAIL_WATCHER', true),
  130. Watchers\ModelWatcher::class => [
  131. 'enabled' => env('TELESCOPE_MODEL_WATCHER', true),
  132. 'events' => ['eloquent.*'],
  133. 'hydrations' => true,
  134. ],
  135. Watchers\NotificationWatcher::class => env('TELESCOPE_NOTIFICATION_WATCHER', true),
  136. Watchers\QueryWatcher::class => [
  137. 'enabled' => env('TELESCOPE_QUERY_WATCHER', true),
  138. 'ignore_packages' => true,
  139. 'ignore_paths' => [],
  140. 'slow' => 100,
  141. ],
  142. Watchers\RedisWatcher::class => env('TELESCOPE_REDIS_WATCHER', true),
  143. Watchers\RequestWatcher::class => [
  144. 'enabled' => env('TELESCOPE_REQUEST_WATCHER', true),
  145. 'size_limit' => env('TELESCOPE_RESPONSE_SIZE_LIMIT', 64),
  146. 'ignore_http_methods' => [],
  147. 'ignore_status_codes' => [],
  148. ],
  149. Watchers\ScheduleWatcher::class => env('TELESCOPE_SCHEDULE_WATCHER', true),
  150. Watchers\ViewWatcher::class => env('TELESCOPE_VIEW_WATCHER', true),
  151. ],
  152. ];