Skip to content
Discussion options

You must be logged in to vote

WOW!!! Understand it now!

The code is right. I just missunderstood how it works!

I thought it would already start with the application, but it is registered only... and keeps this way until first user request comes in,so the singleton is initialized and, in the next ones, it is reused!

Or register the singleton into IoC in ServiceProvider register method and do the 1st use of it in boot method of same provider, making it available when app starts... I think this is the best way because let the lib's listeners and handlers working when app starts.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@wemersonrv
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by wemersonrv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants