Comments (5)
This isn't done by the package automatically because there's no way for the package to know what the correct domain is:
- tenants can have multiple (sub)domains
- there may be multiple central domains
You should manually update app.url
or use app('url')->forceRoot()
with the right hostname.
We've added a bootstrapper for this in v4 but it still requires configuration due to the reasons above.
from tenancy.
Could we add a primary domain config somewhere, maybe as extra column in the domains table?
from tenancy.
Yes, you can do that. It's up to you how you approach this, the right solution here will be application-specific.
from tenancy.
Ok, might be a common use case, anyway I'll handle it. Thanks for the super fast reply!
from tenancy.
In v4 we've added:
- default configuration for the new bootstrapper that just uses
domains->first()
iirc - single domain tenants, for cases where you might not need a separate domains table. So the domain is just stored on a string column
In the SaaS boilerplate we use this primary domain concept. iirc it's a hasOne()
relation from the tenant.
The package won't ship with primary domains out of the box since they only make sense when you really do need multiple domains and have some UI for letting the tenant manage their domains. But the changes we've made should add a good default implementation for this use case.
from tenancy.
Related Issues (20)
- Undefined constant RedisCluster::OPT_PREFIX HOT 5
- With laravel breeze and react ,Inertia.js not working after installing the package HOT 1
- Wrong domain url when on queue HOT 2
- Jestream Laravel Tenacy HOT 5
- InitializeTenancyByPath with livewire within tenant context throws exception HOT 8
- Make runForMultiple yield the callbacks return HOT 5
- Sugestion new Middleware
- Pass tenant to handle when using TenantAwareCommand trait HOT 2
- Tenancy is not working for Livewire HOT 4
- Nested sub domain HOT 3
- Could Not Switch tenants when using Aritsan command HOT 1
- 3.8.3 ViteBundler incompatibility with Laravel 9 HOT 3
- laravel 10 support HOT 1
- LOG.warning tenantIdColumn is deprecated HOT 1
- PostgreSQL Tenant Database Not Automatically Created During Tenant Creation
- Call to a member function getTenantKey() on null HOT 2
- Using RedisTenancyBoostrapper causes problems with queue worker
- Issue with Invalidating Tenant Cache when Redis Data Separation is Enabled
- Create Tenant will trigger Tenancy bootstrappers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tenancy.