mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 08:04:03 +00:00
Fix #998, centralize config used by BelongsToTenant and HasDomains
This commit is contained in:
parent
942d79cbd7
commit
dd0f03f742
14 changed files with 41 additions and 32 deletions
|
|
@ -31,7 +31,7 @@ beforeEach(function () {
|
|||
$table->foreign('post_id')->references('id')->on('posts')->onUpdate('cascade')->onDelete('cascade');
|
||||
});
|
||||
|
||||
config(['tenancy.tenant_model' => Tenant::class]);
|
||||
config(['tenancy.models.tenant' => Tenant::class]);
|
||||
});
|
||||
|
||||
test('primary models are scoped to the current tenant', function () {
|
||||
|
|
@ -142,7 +142,7 @@ test('tenant id is not auto added when creating primary resources in central con
|
|||
});
|
||||
|
||||
test('tenant id column name can be customized', function () {
|
||||
config(['tenancy.single_db.tenant_id_column' => 'team_id']);
|
||||
config(['tenancy.models.tenant_key_column' => 'team_id']);
|
||||
|
||||
Schema::drop('comments');
|
||||
Schema::drop('posts');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue