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

Multi-Tenancy #106

Open
zinct opened this issue Dec 30, 2022 · 8 comments
Open

Multi-Tenancy #106

zinct opened this issue Dec 30, 2022 · 8 comments
Labels
help wanted Extra attention is needed

Comments

@zinct
Copy link

zinct commented Dec 30, 2022

Hello,
first of all thank you so much for creating this package.. How do I implement multitenancy into this package?

I am currently creating an application that uses the multitenancy feature with the archtechx/tenancy package. I have already created a duplicate of the scheduled_notifications table in the tenant database, but I am unable to perform the php artisan snooze:send command because this actions will trigger to the central database while the notification data is located in the tenant database.

@chatisk
Copy link

chatisk commented Apr 26, 2023

@zinct did you try to run the command as following?

php artisan tenants:run snooze:send --tenants=your-tenant ?

@yashiroiori
Copy link

@zinct did you try to run the command as following?

php artisan tenants:run snooze:send --tenants=your-tenant ?

How to send in Central App?? Use into model connection name, but say No hint path defined for [connectioName]

@atymic atymic added the help wanted Extra attention is needed label Mar 20, 2024
@atymic
Copy link
Collaborator

atymic commented Mar 20, 2024

I don't use this package, but feel free to PR if you can figure out the way to solve this.

@yashiroiori
Copy link

I don't use this package, but feel free to PR if you can figure out the way to solve this.

I understand, It's possible set custom connection when create notification?? Default connection use "mysql"

@atymic
Copy link
Collaborator

atymic commented Mar 20, 2024

Hmm, could you link to your docs on the tenancy package? Ideally we could find a way that works with most/all tenancy packages.

@yashiroiori
Copy link

Hmm, could you link to your docs on the tenancy package? Ideally we could find a way that works with most/all tenancy packages.

Into table jobs snooze save connection name, into the package have 2 connections, the first are central connection named mysql or system is use by the central system is how works that and snooze works fine with notifications created into central app, the second connection named tenant the package detect that name use a database of tenant but snooze set name connection mysql don't work with tenants, may fixed it's the posibility to pass a name connection when create a notification with snooze

https://tenancyforlaravel.com/docs/v3/introduction/

@chatisk
Copy link

chatisk commented Apr 13, 2024

I don't know your situation. But if you are using the stancl multitenanxmcy package, then all you have to do is to add a trait called CentralConnection to the model you want to save. That way it will connect to the central db. Not the tenant's

@yashiroiori
Copy link

I don't know your situation. But if you are using the stancl multitenanxmcy package, then all you have to do is to add a trait called CentralConnection to the model you want to save. That way it will connect to the central db. Not the tenant's

But how snooze search data whe the notification are tenant model like custoner, the central app y tenant have Customers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants