ide-helper.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Filename & Format
  6. |--------------------------------------------------------------------------
  7. |
  8. | The default filename
  9. |
  10. */
  11. 'filename' => '_ide_helper.php',
  12. /*
  13. |--------------------------------------------------------------------------
  14. | Where to write the PhpStorm specific meta file
  15. |--------------------------------------------------------------------------
  16. |
  17. | PhpStorm also supports the directory `.phpstorm.meta.php/` with arbitrary
  18. | files in it, should you need additional files for your project; e.g.
  19. | `.phpstorm.meta.php/laravel_ide_Helper.php'.
  20. |
  21. */
  22. 'meta_filename' => '.phpstorm.meta.php',
  23. /*
  24. |--------------------------------------------------------------------------
  25. | Fluent helpers
  26. |--------------------------------------------------------------------------
  27. |
  28. | Set to true to generate commonly used Fluent methods
  29. |
  30. */
  31. 'include_fluent' => false,
  32. /*
  33. |--------------------------------------------------------------------------
  34. | Factory Builders
  35. |--------------------------------------------------------------------------
  36. |
  37. | Set to true to generate factory generators for better factory()
  38. | method auto-completion.
  39. |
  40. | Deprecated for Laravel 8 or latest.
  41. |
  42. */
  43. 'include_factory_builders' => false,
  44. /*
  45. |--------------------------------------------------------------------------
  46. | Write Model Magic methods
  47. |--------------------------------------------------------------------------
  48. |
  49. | Set to false to disable write magic methods of model
  50. |
  51. */
  52. 'write_model_magic_where' => true,
  53. /*
  54. |--------------------------------------------------------------------------
  55. | Write Model External Eloquent Builder methods
  56. |--------------------------------------------------------------------------
  57. |
  58. | Set to false to disable write external eloquent builder methods
  59. |
  60. */
  61. 'write_model_external_builder_methods' => true,
  62. /*
  63. |--------------------------------------------------------------------------
  64. | Write Model relation count properties
  65. |--------------------------------------------------------------------------
  66. |
  67. | Set to false to disable writing of relation count properties to model DocBlocks.
  68. |
  69. */
  70. 'write_model_relation_count_properties' => true,
  71. /*
  72. |--------------------------------------------------------------------------
  73. | Write Eloquent Model Mixins
  74. |--------------------------------------------------------------------------
  75. |
  76. | This will add the necessary DocBlock mixins to the model class
  77. | contained in the Laravel Framework. This helps the IDE with
  78. | auto-completion.
  79. |
  80. | Please be aware that this setting changes a file within the /vendor directory.
  81. |
  82. */
  83. 'write_eloquent_model_mixins' => false,
  84. /*
  85. |--------------------------------------------------------------------------
  86. | Helper files to include
  87. |--------------------------------------------------------------------------
  88. |
  89. | Include helper files. By default not included, but can be toggled with the
  90. | -- helpers (-H) option. Extra helper files can be included.
  91. |
  92. */
  93. 'include_helpers' => false,
  94. 'helper_files' => [
  95. base_path() . '/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
  96. ],
  97. /*
  98. |--------------------------------------------------------------------------
  99. | Model locations to include
  100. |--------------------------------------------------------------------------
  101. |
  102. | Define in which directories the ide-helper:models command should look
  103. | for models.
  104. |
  105. | glob patterns are supported to easier reach models in sub-directories,
  106. | e.g. `app/Services/* /Models` (without the space)
  107. |
  108. */
  109. 'model_locations' => [
  110. 'app',
  111. ],
  112. /*
  113. |--------------------------------------------------------------------------
  114. | Models to ignore
  115. |--------------------------------------------------------------------------
  116. |
  117. | Define which models should be ignored.
  118. |
  119. */
  120. 'ignored_models' => [
  121. ],
  122. /*
  123. |--------------------------------------------------------------------------
  124. | Extra classes
  125. |--------------------------------------------------------------------------
  126. |
  127. | These implementations are not really extended, but called with magic functions
  128. |
  129. */
  130. 'extra' => [
  131. 'Eloquent' => ['Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'],
  132. 'Session' => ['Illuminate\Session\Store'],
  133. ],
  134. 'magic' => [],
  135. /*
  136. |--------------------------------------------------------------------------
  137. | Interface implementations
  138. |--------------------------------------------------------------------------
  139. |
  140. | These interfaces will be replaced with the implementing class. Some interfaces
  141. | are detected by the helpers, others can be listed below.
  142. |
  143. */
  144. 'interfaces' => [
  145. ],
  146. /*
  147. |--------------------------------------------------------------------------
  148. | Support for custom DB types
  149. |--------------------------------------------------------------------------
  150. |
  151. | This setting allow you to map any custom database type (that you may have
  152. | created using CREATE TYPE statement or imported using database plugin
  153. | / extension to a Doctrine type.
  154. |
  155. | Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are:
  156. | 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql'
  157. |
  158. | This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant
  159. |
  160. | The value of the array is an array of type mappings. Key is the name of the custom type,
  161. | (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in
  162. | our case it is 'json_array'. Doctrine types are listed here:
  163. | http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html
  164. |
  165. | So to support jsonb in your models when working with Postgres, just add the following entry to the array below:
  166. |
  167. | "postgresql" => array(
  168. | "jsonb" => "json_array",
  169. | ),
  170. |
  171. */
  172. 'custom_db_types' => [
  173. ],
  174. /*
  175. |--------------------------------------------------------------------------
  176. | Support for camel cased models
  177. |--------------------------------------------------------------------------
  178. |
  179. | There are some Laravel packages (such as Eloquence) that allow for accessing
  180. | Eloquent model properties via camel case, instead of snake case.
  181. |
  182. | Enabling this option will support these packages by saving all model
  183. | properties as camel case, instead of snake case.
  184. |
  185. | For example, normally you would see this:
  186. |
  187. | * @property \Illuminate\Support\Carbon $created_at
  188. | * @property \Illuminate\Support\Carbon $updated_at
  189. |
  190. | With this enabled, the properties will be this:
  191. |
  192. | * @property \Illuminate\Support\Carbon $createdAt
  193. | * @property \Illuminate\Support\Carbon $updatedAt
  194. |
  195. | Note, it is currently an all-or-nothing option.
  196. |
  197. */
  198. 'model_camel_case_properties' => false,
  199. /*
  200. |--------------------------------------------------------------------------
  201. | Property Casts
  202. |--------------------------------------------------------------------------
  203. |
  204. | Cast the given "real type" to the given "type".
  205. |
  206. */
  207. 'type_overrides' => [
  208. 'integer' => 'int',
  209. 'boolean' => 'bool',
  210. ],
  211. /*
  212. |--------------------------------------------------------------------------
  213. | Include DocBlocks from classes
  214. |--------------------------------------------------------------------------
  215. |
  216. | Include DocBlocks from classes to allow additional code inspection for
  217. | magic methods and properties.
  218. |
  219. */
  220. 'include_class_docblocks' => false,
  221. /*
  222. |--------------------------------------------------------------------------
  223. | Force FQN usage
  224. |--------------------------------------------------------------------------
  225. |
  226. | Use the fully qualified (class) name in docBlock,
  227. | event if class exists in a given file
  228. | or there is an import (use className) of a given class
  229. |
  230. */
  231. 'force_fqn' => false,
  232. /*
  233. |--------------------------------------------------------------------------
  234. | Additional relation types
  235. |--------------------------------------------------------------------------
  236. |
  237. | Sometimes it's needed to create custom relation types. The key of the array
  238. | is the Relationship Method name. The value of the array is the canonical class
  239. | name of the Relationship, e.g. `'relationName' => RelationShipClass::class`.
  240. |
  241. */
  242. 'additional_relation_types' => [],
  243. ];