Replies: 2 comments
-
LedgerName is there to allow the naming of things with multiple languages. I can't see how this could be related to a specific company. I suggest that the best way to implement a multi-tenant solution is to create a database or set of tables for each tenant. Ledger supports both independent database connections and table prefixes. Of the two options, I would advise a multi-database approach. Maintaining multiple clients in a single database is fraught with potential problems, not the least of which is that they will be sharing the same Chart of Accounts. Multiple databases make it easier to customize the CoA per client, partitions data in the event of a security compromise, and makes it easier to remove a company without impacting other companies. It should be fairly straightforward to add a layer that maps authentication credentials to the client's database. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick response. I appreciate the insight you have provided. I used LedgerName because it was the closest thing I saw related to the main Ledger, that did not come out clear to me in the documentation and inspection of models. I have taken your advice so building a separate API which will provide functionality and connectivity to the separte databases. |
Beta Was this translation helpful? Give feedback.
-
Hello,
Thank you for your wonderful work. I am trying to integrate it into a multitenant set-up through Filament V3 where a Ledger would belong to a company.
I have extended the LedgerName model to add the relationship to the company as follows:
I am looking for a best practise recommendation being new to Laravel while also trying to avoid redoing most of the work which the API already has done when persisting the relationships such as currency, accounts etc.
Best,
N
Beta Was this translation helpful? Give feedback.
All reactions