Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Approach to multi-tenancy docs #721

Closed
1 task done
onovaes opened this issue Sep 7, 2023 · 2 comments
Closed
1 task done

Approach to multi-tenancy docs #721

onovaes opened this issue Sep 7, 2023 · 2 comments
Labels
question Further information is requested

Comments

@onovaes
Copy link

onovaes commented Sep 7, 2023

Scribe version

4.23.1

Your question

I'm making a multitenant application with package (/spatie/laravel-multitenancy) and generating static documentation.

When I access /docs/ the Base URL always get the APP_URL.

How do I generate each /docs/ with Base URL correct for each tenant?

What is the best approach to multi-tenancy?

Docs

@onovaes onovaes added question Further information is requested triage labels Sep 7, 2023
@shalvah shalvah removed the triage label Sep 7, 2023
@shalvah
Copy link
Contributor

shalvah commented Sep 7, 2023

Hmm, I don't have an answer out of the box for you. First thing is that you should definitely be using laravel type, because that's the only way you can add some dynamic behaviour to your docs.

I'd advise you to read the docs about the URLs Scribe uses (displaying vs Try It Out vs response calls), if you haven't already done so.

My guess is that you can use laravel type and customise the generated Blade views to display a dynamic base URL instead, or something like that. Or you could even set base_url to a dynamic string, like 'config ("app.tenant_url"). It might work.

@shalvah
Copy link
Contributor

shalvah commented Sep 7, 2023

Or you could even set base_url to a dynamic string, like 'config ("app.tenant_url"). It might work

Okay, tested it and it doesn't work. But pushed a patch to master and it sort of does, now. Can you test that out?

@shalvah shalvah closed this as completed Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants