Giter Site home page Giter Site logo

Comments (5)

stancl avatar stancl commented on June 12, 2024

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.

giorgiopogliani avatar giorgiopogliani commented on June 12, 2024

Could we add a primary domain config somewhere, maybe as extra column in the domains table?

from tenancy.

stancl avatar stancl commented on June 12, 2024

Yes, you can do that. It's up to you how you approach this, the right solution here will be application-specific.

from tenancy.

giorgiopogliani avatar giorgiopogliani commented on June 12, 2024

Ok, might be a common use case, anyway I'll handle it. Thanks for the super fast reply!

from tenancy.

stancl avatar stancl commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.