-
-
Notifications
You must be signed in to change notification settings - Fork 374
Adding event to notify App Installation on the store #1220
base: master
Are you sure you want to change the base?
Conversation
Thanks for submitting a PR. Could you let me know how you would use this differently to the Thanks! |
Also, need to add the @osiset and @Kyon147 |
@nahid I think Kyron147 was asking how does it differ from |
@osiset Thanks, got it. I think the
|
@nahid Sounds fine to me, if you would like to add those additional events and some jotnotes on how to use the events so we can form a wiki entry for people, that would be great. We can then review and merge in for a major release. |
Thank you @osiset, I'll make a PR with these changes ASAP. |
@nahid One thing to note for appinstalled, is that there will need to be an option to run it "inline" and not later somehow. Some people require changes to be made before the shop user sees the app (example, set some flag in the database). |
@osiset Given that this is not a job being dispatch but an event, then note that events are always synchronous. The listeners one might register for these events on the other hand can be either queued or synchronous. So "inline" is essentially build into the implementation using events, making it a really nice solution for any use case 👍 |
@bilfeldt exactly, if someone wants to run |
The
AppInstalled
event will be triggered after the installation of App on the store. This can be used to run jobs after successful installation. For example, fetching data from the store that is needed by the application.Here is an example of how to set up a Listener and subscribe to it on the project's EventServiceProvider.
Once your listener has been defined, you may register it within your application's
EventServiceProvider
:@Kyon147, I am resending this PR again as the last PR (#1058) had additional code that was already merged in to the repo.