1 | <?php |
||
2 | |||
3 | use Salah3id\Domains\Activators\FileActivator; |
||
4 | use Salah3id\Domains\Commands; |
||
5 | |||
6 | return [ |
||
7 | |||
8 | /* |
||
9 | |-------------------------------------------------------------------------- |
||
10 | | Domain Namespace |
||
11 | |-------------------------------------------------------------------------- |
||
12 | | |
||
13 | | Default domain namespace. |
||
14 | | |
||
15 | */ |
||
16 | |||
17 | 'namespace' => 'Domains', |
||
18 | |||
19 | /* |
||
20 | |-------------------------------------------------------------------------- |
||
21 | | Domain Stubs |
||
22 | |-------------------------------------------------------------------------- |
||
23 | | |
||
24 | | Default domain stubs. |
||
25 | | |
||
26 | */ |
||
27 | |||
28 | 'stubs' => [ |
||
29 | 'enabled' => false, |
||
30 | 'path' => base_path('vendor/salah3id/address-domains/src/Commands/stubs'), |
||
31 | 'files' => [ |
||
32 | 'routes/web' => 'Routes/web.php', |
||
33 | 'routes/api' => 'Routes/api.php', |
||
34 | 'views/index' => 'Resources/views/index.blade.php', |
||
35 | 'views/master' => 'Resources/views/layouts/master.blade.php', |
||
36 | 'scaffold/config' => 'Config/config.php', |
||
37 | 'composer' => 'composer.json', |
||
38 | 'assets/js/app' => 'Resources/assets/js/app.js', |
||
39 | 'assets/sass/app' => 'Resources/assets/sass/app.scss', |
||
40 | 'vite' => 'vite.config.js', |
||
41 | 'package' => 'package.json', |
||
42 | ], |
||
43 | 'replacements' => [ |
||
44 | 'routes/web' => ['LOWER_NAME', 'STUDLY_NAME'], |
||
45 | 'routes/api' => ['LOWER_NAME'], |
||
46 | 'vite' => ['LOWER_NAME'], |
||
47 | 'json' => ['LOWER_NAME', 'STUDLY_NAME', 'DOMAIN_NAMESPACE', 'PROVIDER_NAMESPACE'], |
||
48 | 'views/index' => ['LOWER_NAME'], |
||
49 | 'views/master' => ['LOWER_NAME', 'STUDLY_NAME'], |
||
50 | 'scaffold/config' => ['STUDLY_NAME'], |
||
51 | 'composer' => [ |
||
52 | 'LOWER_NAME', |
||
53 | 'STUDLY_NAME', |
||
54 | 'VENDOR', |
||
55 | 'AUTHOR_NAME', |
||
56 | 'AUTHOR_EMAIL', |
||
57 | 'DOMAIN_NAMESPACE', |
||
58 | 'PROVIDER_NAMESPACE', |
||
59 | ], |
||
60 | ], |
||
61 | 'gitkeep' => true, |
||
62 | ], |
||
63 | 'paths' => [ |
||
64 | /* |
||
65 | |-------------------------------------------------------------------------- |
||
66 | | Domains path |
||
67 | |-------------------------------------------------------------------------- |
||
68 | | |
||
69 | | This path used for save the generated domain. This path also will be added |
||
70 | | automatically to list of scanned folders. |
||
71 | | |
||
72 | */ |
||
73 | |||
74 | 'domains' => base_path('Domains'), |
||
75 | /* |
||
76 | |-------------------------------------------------------------------------- |
||
77 | | Domains assets path |
||
78 | |-------------------------------------------------------------------------- |
||
79 | | |
||
80 | | Here you may update the domains assets path. |
||
81 | | |
||
82 | */ |
||
83 | |||
84 | 'assets' => public_path('domains'), |
||
85 | /* |
||
86 | |-------------------------------------------------------------------------- |
||
87 | | The migrations path |
||
88 | |-------------------------------------------------------------------------- |
||
89 | | |
||
90 | | Where you run 'domain:publish-migration' command, where do you publish the |
||
91 | | the migration files? |
||
92 | | |
||
93 | */ |
||
94 | |||
95 | 'migration' => base_path('database/migrations'), |
||
96 | /* |
||
97 | |-------------------------------------------------------------------------- |
||
98 | | Generator path |
||
99 | |-------------------------------------------------------------------------- |
||
100 | | Customise the paths where the folders will be generated. |
||
101 | | Set the generate key to false to not generate that folder |
||
102 | */ |
||
103 | 'generator' => [ |
||
104 | 'config' => ['path' => 'Config', 'generate' => true], |
||
105 | 'command' => ['path' => 'Console', 'generate' => true], |
||
106 | 'migration' => ['path' => 'Database/Migrations', 'generate' => true], |
||
107 | 'seeder' => ['path' => 'Database/Seeders', 'generate' => true], |
||
108 | 'factory' => ['path' => 'Database/factories', 'generate' => true], |
||
109 | 'model' => ['path' => 'Entities', 'generate' => true], |
||
110 | 'routes' => ['path' => 'Routes', 'generate' => true], |
||
111 | 'controller' => ['path' => 'Http/Controllers', 'generate' => true], |
||
112 | 'filter' => ['path' => 'Http/Middleware', 'generate' => true], |
||
113 | 'request' => ['path' => 'Http/Requests', 'generate' => true], |
||
114 | 'provider' => ['path' => 'Providers', 'generate' => true], |
||
115 | 'assets' => ['path' => 'Resources/assets', 'generate' => true], |
||
116 | 'lang' => ['path' => 'Resources/lang', 'generate' => true], |
||
117 | 'views' => ['path' => 'Resources/views', 'generate' => true], |
||
118 | 'test' => ['path' => 'Tests/Unit', 'generate' => true], |
||
119 | 'test-feature' => ['path' => 'Tests/Feature', 'generate' => true], |
||
120 | 'repository' => ['path' => 'Repositories', 'generate' => false], |
||
121 | 'event' => ['path' => 'Events', 'generate' => false], |
||
122 | 'listener' => ['path' => 'Listeners', 'generate' => false], |
||
123 | 'policies' => ['path' => 'Policies', 'generate' => false], |
||
124 | 'rules' => ['path' => 'Rules', 'generate' => false], |
||
125 | 'jobs' => ['path' => 'Jobs', 'generate' => false], |
||
126 | 'emails' => ['path' => 'Emails', 'generate' => false], |
||
127 | 'notifications' => ['path' => 'Notifications', 'generate' => false], |
||
128 | 'resource' => ['path' => 'Transformers', 'generate' => false], |
||
129 | 'component-view' => ['path' => 'Resources/views/components', 'generate' => false], |
||
130 | 'component-class' => ['path' => 'View/Components', 'generate' => false], |
||
131 | ], |
||
132 | |||
133 | |||
134 | /* |
||
135 | |-------------------------------------------------------------------------- |
||
136 | | Repositories Generator Config |
||
137 | |-------------------------------------------------------------------------- |
||
138 | | |
||
139 | */ |
||
140 | 'repo-generator' => [ |
||
141 | 'stubsOverridePath' => app()->path(), |
||
142 | 'paths' => [ |
||
143 | 'models' => 'Entities', |
||
144 | 'repositories' => 'Repositories', |
||
145 | 'interfaces' => 'Repositories', |
||
146 | 'transformers' => 'Transformers', |
||
147 | 'presenters' => 'Presenters', |
||
148 | 'validators' => 'Validators', |
||
149 | 'controllers' => 'Http/Controllers', |
||
150 | 'provider' => 'RepositoryServiceProvider', |
||
151 | 'criteria' => 'Criteria', |
||
152 | 'relations' => 'Entities/Traits/Relations' |
||
153 | ] |
||
154 | ] |
||
155 | ], |
||
156 | |||
157 | /* |
||
158 | |-------------------------------------------------------------------------- |
||
159 | | Package commands |
||
160 | |-------------------------------------------------------------------------- |
||
161 | | |
||
162 | | Here you can define which commands will be visible and used in your |
||
163 | | application. If for example you don't use some of the commands provided |
||
164 | | you can simply comment them out. |
||
165 | | |
||
166 | */ |
||
167 | 'commands' => [ |
||
168 | Commands\CommandMakeCommand::class, |
||
169 | Commands\ComponentClassMakeCommand::class, |
||
170 | Commands\ComponentViewMakeCommand::class, |
||
171 | Commands\ControllerMakeCommand::class, |
||
172 | Commands\DisableCommand::class, |
||
173 | Commands\DumpCommand::class, |
||
174 | Commands\EnableCommand::class, |
||
175 | Commands\EventMakeCommand::class, |
||
176 | Commands\JobMakeCommand::class, |
||
177 | Commands\ListenerMakeCommand::class, |
||
178 | Commands\MailMakeCommand::class, |
||
179 | Commands\MiddlewareMakeCommand::class, |
||
180 | Commands\NotificationMakeCommand::class, |
||
181 | Commands\ProviderMakeCommand::class, |
||
182 | Commands\RouteProviderMakeCommand::class, |
||
183 | Commands\InstallCommand::class, |
||
184 | Commands\ListCommand::class, |
||
185 | Commands\DomainDeleteCommand::class, |
||
186 | Commands\DomainMakeCommand::class, |
||
187 | Commands\FactoryMakeCommand::class, |
||
188 | Commands\PolicyMakeCommand::class, |
||
189 | Commands\RequestMakeCommand::class, |
||
190 | Commands\RuleMakeCommand::class, |
||
191 | Commands\MigrateCommand::class, |
||
192 | Commands\MigrateFreshCommand::class, |
||
193 | Commands\MigrateRefreshCommand::class, |
||
194 | Commands\MigrateResetCommand::class, |
||
195 | Commands\MigrateRollbackCommand::class, |
||
196 | Commands\MigrateStatusCommand::class, |
||
197 | Commands\MigrationMakeCommand::class, |
||
198 | Commands\ModelMakeCommand::class, |
||
199 | Commands\PublishCommand::class, |
||
200 | Commands\PublishConfigurationCommand::class, |
||
201 | Commands\PublishMigrationCommand::class, |
||
202 | Commands\PublishTranslationCommand::class, |
||
203 | Commands\SeedCommand::class, |
||
204 | Commands\SeedMakeCommand::class, |
||
205 | Commands\SetupCommand::class, |
||
206 | Commands\UnUseCommand::class, |
||
207 | Commands\UpdateCommand::class, |
||
208 | Commands\UseCommand::class, |
||
209 | Commands\ResourceMakeCommand::class, |
||
210 | Commands\TestMakeCommand::class, |
||
211 | Commands\LaravelDomainsV6Migrator::class, |
||
212 | |||
213 | Commands\RepositoryCommand::class, |
||
214 | Commands\TransformerCommand::class, |
||
215 | Commands\PresenterCommand::class, |
||
216 | Commands\EntityCommand::class, |
||
217 | Commands\ValidatorCommand::class, |
||
218 | Commands\ControllerCommand::class, |
||
219 | Commands\BindingsCommand::class, |
||
220 | Commands\CriteriaCommand::class |
||
221 | |||
222 | ], |
||
223 | |||
224 | /* |
||
225 | |-------------------------------------------------------------------------- |
||
226 | | Scan Path |
||
227 | |-------------------------------------------------------------------------- |
||
228 | | |
||
229 | | Here you define which folder will be scanned. By default will scan vendor |
||
230 | | directory. This is useful if you host the package in packagist website. |
||
231 | | |
||
232 | */ |
||
233 | |||
234 | 'scan' => [ |
||
235 | 'enabled' => false, |
||
236 | 'paths' => [ |
||
237 | base_path('vendor/*/*'), |
||
238 | ], |
||
239 | ], |
||
240 | /* |
||
241 | |-------------------------------------------------------------------------- |
||
242 | | Composer File Template |
||
243 | |-------------------------------------------------------------------------- |
||
244 | | |
||
245 | | Here is the config for composer.json file, generated by this package |
||
246 | | |
||
247 | */ |
||
248 | |||
249 | 'composer' => [ |
||
250 | 'vendor' => 'salah3id', |
||
251 | 'author' => [ |
||
252 | 'name' => 'Nicolas Widart', |
||
253 | 'email' => '[email protected]', |
||
254 | ], |
||
255 | 'composer-output' => false, |
||
256 | ], |
||
257 | |||
258 | /* |
||
259 | |-------------------------------------------------------------------------- |
||
260 | | Caching |
||
261 | |-------------------------------------------------------------------------- |
||
262 | | |
||
263 | | Here is the config for setting up caching feature. |
||
264 | | |
||
265 | */ |
||
266 | 'cache' => [ |
||
267 | 'enabled' => false, |
||
268 | 'driver' => 'file', |
||
269 | 'key' => 'address-domains', |
||
270 | 'lifetime' => 60, |
||
271 | ], |
||
272 | /* |
||
273 | |-------------------------------------------------------------------------- |
||
274 | | Choose what address-domains will register as custom namespaces. |
||
275 | | Setting one to false will require you to register that part |
||
276 | | in your own Service Provider class. |
||
277 | |-------------------------------------------------------------------------- |
||
278 | */ |
||
279 | 'register' => [ |
||
280 | 'translations' => true, |
||
281 | /** |
||
282 | * load files on boot or register method |
||
283 | * |
||
284 | * Note: boot not compatible with asgardcms |
||
285 | * |
||
286 | * @example boot|register |
||
287 | */ |
||
288 | 'files' => 'register', |
||
289 | ], |
||
290 | |||
291 | /* |
||
292 | |-------------------------------------------------------------------------- |
||
293 | | Activators |
||
294 | |-------------------------------------------------------------------------- |
||
295 | | |
||
296 | | You can define new types of activators here, file, database etc. The only |
||
297 | | required parameter is 'class'. |
||
298 | | The file activator will store the activation status in storage/installed_domains |
||
299 | */ |
||
300 | 'activators' => [ |
||
301 | 'file' => [ |
||
302 | 'class' => FileActivator::class, |
||
303 | 'statuses-file' => base_path('domains_statuses.json'), |
||
304 | 'cache-key' => 'activator.installed', |
||
305 | 'cache-lifetime' => 604800, |
||
306 | ], |
||
307 | ], |
||
308 | |||
309 | 'activator' => 'file', |
||
310 | |||
311 | /* |
||
312 | |-------------------------------------------------------------------------- |
||
313 | | Criteria Config |
||
314 | |-------------------------------------------------------------------------- |
||
315 | | |
||
316 | | Settings of request parameters names that will be used by Criteria |
||
317 | | |
||
318 | */ |
||
319 | 'criteria' => [ |
||
320 | /* |
||
321 | |-------------------------------------------------------------------------- |
||
322 | | Accepted Conditions |
||
323 | |-------------------------------------------------------------------------- |
||
324 | | |
||
325 | | Conditions accepted in consultations where the Criteria |
||
326 | | |
||
327 | | Ex: |
||
328 | | |
||
329 | | 'acceptedConditions'=>['=','like'] |
||
330 | | |
||
331 | | $query->where('foo','=','bar') |
||
332 | | $query->where('foo','like','bar') |
||
333 | | |
||
334 | */ |
||
335 | 'acceptedConditions' => [ |
||
336 | '=', |
||
337 | 'like', |
||
338 | 'in' |
||
339 | ], |
||
340 | /* |
||
341 | |-------------------------------------------------------------------------- |
||
342 | | Request Params |
||
343 | |-------------------------------------------------------------------------- |
||
344 | | |
||
345 | | Request parameters that will be used to filter the query in the repository |
||
346 | | |
||
347 | | Params : |
||
348 | | |
||
349 | | - search : Searched value |
||
350 | | Ex: http://salah3id.local/?search=lorem |
||
351 | | |
||
352 | | - searchFields : Fields in which research should be carried out |
||
353 | | Ex: |
||
354 | | http://salah3id.local/?search=lorem&searchFields=name;email |
||
355 | | http://salah3id.local/?search=lorem&searchFields=name:like;email |
||
356 | | http://salah3id.local/?search=lorem&searchFields=name:like |
||
357 | | |
||
358 | | - filter : Fields that must be returned to the response object |
||
359 | | Ex: |
||
360 | | http://salah3id.local/?search=lorem&filter=id,name |
||
361 | | |
||
362 | | - orderBy : Order By |
||
363 | | Ex: |
||
364 | | http://salah3id.local/?search=lorem&orderBy=id |
||
365 | | |
||
366 | | - sortedBy : Sort |
||
367 | | Ex: |
||
368 | | http://salah3id.local/?search=lorem&orderBy=id&sortedBy=asc |
||
369 | | http://salah3id.local/?search=lorem&orderBy=id&sortedBy=desc |
||
370 | | |
||
371 | | - searchJoin: Specifies the search method (AND / OR), by default the |
||
372 | | application searches each parameter with OR |
||
373 | | EX: |
||
374 | | http://salah3id.local/?search=lorem&searchJoin=and |
||
375 | | http://salah3id.local/?search=lorem&searchJoin=or |
||
376 | | |
||
377 | */ |
||
378 | 'params' => [ |
||
379 | 'search' => 'search', |
||
380 | 'searchFields' => 'searchFields', |
||
381 | 'filter' => 'filter', |
||
382 | 'orderBy' => 'orderBy', |
||
383 | 'sortedBy' => 'sortedBy', |
||
384 | 'with' => 'with', |
||
385 | 'searchJoin' => 'searchJoin', |
||
386 | 'withCount' => 'withCount' |
||
387 | ] |
||
388 | ], |
||
389 | |||
390 | /* |
||
391 | |-------------------------------------------------------------------------- |
||
392 | | Repository Cache Config |
||
393 | |-------------------------------------------------------------------------- |
||
394 | | |
||
395 | */ |
||
396 | 'repo-cache' => [ |
||
397 | /* |
||
398 | |-------------------------------------------------------------------------- |
||
399 | | Cache Status |
||
400 | |-------------------------------------------------------------------------- |
||
401 | | |
||
402 | | Enable or disable cache |
||
403 | | |
||
404 | */ |
||
405 | 'enabled' => false, |
||
406 | |||
407 | /* |
||
408 | |-------------------------------------------------------------------------- |
||
409 | | Cache Minutes |
||
410 | |-------------------------------------------------------------------------- |
||
411 | | |
||
412 | | Time of expiration cache |
||
413 | | |
||
414 | */ |
||
415 | 'minutes' => 30, |
||
416 | |||
417 | /* |
||
418 | |-------------------------------------------------------------------------- |
||
419 | | Cache Repository |
||
420 | |-------------------------------------------------------------------------- |
||
421 | | |
||
422 | | Instance of Illuminate\Contracts\Cache\Repository |
||
423 | | |
||
424 | */ |
||
425 | 'repository' => 'cache', |
||
426 | |||
427 | /* |
||
428 | |-------------------------------------------------------------------------- |
||
429 | | Cache Clean Listener |
||
430 | |-------------------------------------------------------------------------- |
||
431 | | |
||
432 | | |
||
433 | | |
||
434 | */ |
||
435 | 'clean' => [ |
||
436 | |||
437 | /* |
||
438 | |-------------------------------------------------------------------------- |
||
439 | | Enable clear cache on repository changes |
||
440 | |-------------------------------------------------------------------------- |
||
441 | | |
||
442 | */ |
||
443 | 'enabled' => true, |
||
444 | |||
445 | /* |
||
446 | |-------------------------------------------------------------------------- |
||
447 | | Actions in Repository |
||
448 | |-------------------------------------------------------------------------- |
||
449 | | |
||
450 | | create : Clear Cache on create Entry in repository |
||
451 | | update : Clear Cache on update Entry in repository |
||
452 | | delete : Clear Cache on delete Entry in repository |
||
453 | | |
||
454 | */ |
||
455 | 'on' => [ |
||
456 | 'create' => true, |
||
457 | 'update' => true, |
||
458 | 'delete' => true, |
||
459 | ] |
||
460 | ], |
||
461 | |||
462 | 'params' => [ |
||
463 | /* |
||
464 | |-------------------------------------------------------------------------- |
||
465 | | Skip Cache Params |
||
466 | |-------------------------------------------------------------------------- |
||
467 | | |
||
468 | | |
||
469 | | Ex: http://prettus.local/?search=lorem&skipCache=true |
||
470 | | |
||
471 | */ |
||
472 | 'skipCache' => 'skipCache' |
||
473 | ], |
||
474 | |||
475 | /* |
||
476 | |-------------------------------------------------------------------------- |
||
477 | | Methods Allowed |
||
478 | |-------------------------------------------------------------------------- |
||
479 | | |
||
480 | | methods cacheable : all, paginate, find, findByField, findWhere, getByCriteria |
||
481 | | |
||
482 | | Ex: |
||
483 | | |
||
484 | | 'only' =>['all','paginate'], |
||
485 | | |
||
486 | | or |
||
487 | | |
||
488 | | 'except' =>['find'], |
||
489 | */ |
||
490 | 'allowed' => [ |
||
491 | 'only' => null, |
||
492 | 'except' => null |
||
493 | ] |
||
494 | ], |
||
495 | |||
496 | /* |
||
497 | |-------------------------------------------------------------------------- |
||
498 | | Repository Pagination Limit Default |
||
499 | |-------------------------------------------------------------------------- |
||
500 | | |
||
501 | */ |
||
502 | 'pagination' => [ |
||
503 | 'limit' => 15 |
||
504 | ], |
||
505 | |||
506 | /* |
||
507 | |-------------------------------------------------------------------------- |
||
508 | | Fractal Presenter Config |
||
509 | |-------------------------------------------------------------------------- |
||
510 | | |
||
511 | |||
512 | Available serializers: |
||
513 | ArraySerializer |
||
514 | DataArraySerializer |
||
515 | JsonApiSerializer |
||
516 | |||
517 | */ |
||
518 | 'fractal' => [ |
||
519 | 'params' => [ |
||
520 | 'include' => 'include' |
||
521 | ], |
||
522 | 'serializer' => League\Fractal\Serializer\DataArraySerializer::class |
||
0 ignored issues
–
show
|
|||
523 | ], |
||
524 | ]; |
||
525 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths