Compatible with Spatie Multitenancy?
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Compatible with Spatie Multitenancy?
Has anyone got this to install or work with Spatie Multitenancy? We have a product using Spatie Multitenancy, and are hitting a road block in trying to get this to install. Mostly because we are using multiple databases, and this package can't find the right one.
Re: Compatible with Spatie Multitenancy?
Aimeos has it's own record base multi-tenancy and doesn't need several databases for that. But you can configure the database it should use here: https://github.com/aimeos/aimeos-larave ... hp#L51-L66
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

-
- Posts: 28
- Joined: 17 Aug 2023, 00:16
Re: Compatible with Spatie Multitenancy?
The config in `shop.php` for database is static.aimeos wrote: ↑15 Nov 2024, 15:41 Aimeos has it's own record base multi-tenancy and doesn't need several databases for that. But you can configure the database it should use here: https://github.com/aimeos/aimeos-larave ... hp#L51-L66
I need aimeos to use different database connections for different requests, depending upon the site.
Before the request hits Aimeos, I am determining the site-id and trying to update the database connection for aimeos. I am trying something like this
Code: Select all
$ctx = new \Aimeos\MShop\Context();
$dbm = new \Aimeos\Base\DB\Manager\Standard(config('database.connections.test'), 'DBAL');
$ctx->setDatabaseManager( $dbm );
What I require is that, I set the DatabaseManager for AImeos before processing the request.
Is it possible to achieve this scenerio? Can we set database connections for Aimeos dynamically?
Re: Compatible with Spatie Multitenancy?
If you want to use different databases for different clients, why don't you simply create several instances of Aimeos? Having several application instances is no problem any more in cloud environments as they are all cloned from one source.
The Aimeos multi-site feature uses one database for all client sites. You can also use several databases for different data domains (i.e. products, customers, orders, etc.) but those databases contains the data from all clients.
The Aimeos multi-site feature uses one database for all client sites. You can also use several databases for different data domains (i.e. products, customers, orders, etc.) but those databases contains the data from all clients.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

-
- Posts: 28
- Joined: 17 Aug 2023, 00:16
Re: Compatible with Spatie Multitenancy?
Deploying a separate Aimeos instance for each client would be tedious and difficult to maintain. I'm integrating Aimeos into my existing project, and managing multiple instances while ensuring they all stay on the same version and receive updates consistently would add unnecessary complexity. A multi-tenant setup simplifies deployment, maintenance, and updates across all clients.
Re: Compatible with Spatie Multitenancy?
If you want to keep deployment, maintenance, and updates to a bare minimum, then use the existing multi-tenancy feature already offered by Aimeos where all records from all tenants are stored in one database. Spatie-like multi-tenancy with a separate database for each tenant is not supported by Aimeos.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

-
- Posts: 28
- Joined: 17 Aug 2023, 00:16
Re: Compatible with Spatie Multitenancy?
Got it. Thank you.