You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here I am importing the class and binding it in boot method which I think is not a good practice like this
exportdefaultclassServiceProvider{constructor(protectedapp: ApplicationContract){}publicregister(){// Register your own bindings}publicasyncboot(){// IoC container is readyconst{ AuthorizationService }=awaitimport('../app/Services/AuthorizationService')this.app.container.singleton('Struxe/Authorization',()=>newAuthorizationService())}publicasyncready(){// App is ready}publicasyncshutdown(){// Cleanup, since app is going down}}
can I do it like this or is there any better way of doing this
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
here I am importing the class and binding it in boot method which I think is not a good practice like this
can I do it like this or is there any better way of doing this
Beta Was this translation helpful? Give feedback.
All reactions