-
Notifications
You must be signed in to change notification settings - Fork 245
Expand file tree
/
Copy pathmultitenancy.php
More file actions
113 lines (98 loc) · 3.49 KB
/
Copy pathmultitenancy.php
File metadata and controls
113 lines (98 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
use ProcessMaker\Multitenancy\MakeQueueTenantAwareAction;
use ProcessMaker\Multitenancy\SwitchTenant;
use Spatie\Multitenancy\Actions\ForgetCurrentTenantAction;
use Spatie\Multitenancy\Actions\MakeTenantCurrentAction;
use Spatie\Multitenancy\Actions\MigrateTenantAction;
return [
/*
* This class is responsible for determining which tenant should be current
* for the given request.
*
* This class should extend `Spatie\Multitenancy\TenantFinder\TenantFinder`
*
*/
'tenant_finder' => ProcessMaker\Multitenancy\TenantFinder::class,
/*
* These fields are used by tenant:artisan command to match one or more tenant.
*/
'tenant_artisan_search_fields' => [
'id',
],
/*
* These tasks will be performed when switching tenants.
*
* A valid task is any class that implements Spatie\Multitenancy\Tasks\SwitchTenantTask
*/
'switch_tenant_tasks' => [
SwitchTenant::class,
ProcessMaker\Multitenancy\PrefixCacheTask::class,
Spatie\Multitenancy\Tasks\SwitchTenantDatabaseTask::class,
],
/*
* This class is the model used for storing configuration on tenants.
*
* It must extend `Spatie\Multitenancy\Models\Tenant::class` or
* implement `Spatie\Multitenancy\Contracts\IsTenant::class` interface
*/
'tenant_model' => ProcessMaker\Multitenancy\Tenant::class,
/*
* If there is a current tenant when dispatching a job, the id of the current tenant
* will be automatically set on the job. When the job is executed, the set
* tenant on the job will be made current.
*/
'queues_are_tenant_aware_by_default' => true,
/*
* The connection name to reach the tenant database.
*
* Set to `null` to use the default connection.
*/
'tenant_database_connection_name' => null,
/*
* The connection name to reach the landlord database.
*/
'landlord_database_connection_name' => 'landlord',
/*
* This key will be used to associate the current tenant in the context
*/
'current_tenant_context_key' => 'tenantId',
/*
* This key will be used to bind the current tenant in the container.
*/
'current_tenant_container_key' => 'currentTenant',
/*
* Set it to `true` if you like to cache the tenant(s) routes
* in a shared file using the `SwitchRouteCacheTask`.
*/
'shared_routes_cache' => false,
/*
* You can customize some of the behavior of this package by using your own custom action.
* Your custom action should always extend the default one.
*/
'actions' => [
'make_tenant_current_action' => MakeTenantCurrentAction::class,
'forget_current_tenant_action' => ForgetCurrentTenantAction::class,
'make_queue_tenant_aware_action' => MakeQueueTenantAwareAction::class,
'migrate_tenant' => MigrateTenantAction::class,
],
/*
* You can customize the way in which the package resolves the queueable to a job.
*
* For example, using the package laravel-actions (by Loris Leiva), you can
* resolve JobDecorator to getAction() like so: JobDecorator::class => 'getAction'
*/
'queueable_to_job' => [
],
/*
* Jobs tenant aware even if these don't implement the TenantAware interface.
*/
'tenant_aware_jobs' => [
// ...
],
/*
* Jobs not tenant aware even if these don't implement the NotTenantAware interface.
*/
'not_tenant_aware_jobs' => [
// ...
],
];