-
-
Notifications
You must be signed in to change notification settings - Fork 374
Better way to store/retrieve separate Shop App installs #91
Comments
Wow, this sounds brutal. Are the different apps you are serving so similar in functionality that you can manage it within one code base? Are there reasons why you wouldn't want one project = one app? Hosting costs, maybe? |
The apps are split into Laravel Packages. The are being served via a single Laravel application in order to maintain a small app ecosystem. Also, for fun! |
Is this something common to do? I've always done one db/setup per app sort of thing. If it something fairly common I don't pursuing it.. I think namespace on the shop table would be the best since thats the main table. If I we're to bake it in, I would probably have a env setting which could define a namespace (app handle or something), and mod the firstOrCreate method on auth to use that namespace, and a scope on the shop model which would add it to every call |
I'm using package configs, rather than the global .env file, so that all app configs are separeted. Yea, the namespace column in the shop table is the likely answer, for now. Is it common? No idea, as I find it difficult to find anyone actively talking about Shopify app development. |
Very true. By .env yes I meant the config PHP file. I don't mind baking this in, if its beneficial to others. |
@paulcanning Decided to hack at this, I can see the use-case. PR #92 covers this. Changes:
Will be doing more reviewing to ensure all is covered. |
FYI - this may be premature, as I'm currently stuck on making binds work with each individual app package. |
No worries, thought I'd share my method!
…On Fri., Aug. 31, 2018, 11:30 a.m. Paul Canning, ***@***.***> wrote:
FYI - this may be premature, as I'm currently stuck on making binds work
with each individual app package.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#91 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACTuOs7iWikW5tbOG3oNow5YC2N3ijFqks5uWUGFgaJpZM4WTTxp>
.
|
v3.2.0 release contains the namespace abilities. Doc on setup/usage as well. Will close for now, unless you wish to continue discussion, thanks! |
Currently, this framework assumes it will be a single app.
In my use-case, my single Laravel app is serving multiple Shopify Apps.
The current way to get Shop info is to look up the shop domain in the
shops
table, but if multiple apps are logging data into that table, there is no way to differentiate.I was considering adding an extra column that would be the apps namespace which gets added to all calls to the shop model.
Thoughts? Ideas?
The text was updated successfully, but these errors were encountered: