mercredi 27 septembre 2017

Lifespan of a class provided by Laravel Service provider

What is the life span of a custom class (whether singleton or non-singleton) created by custom laravel service provider?

My current understanding is that it gets created and destroyed every time user access a web page that needs the instance of this singleton class. Also it does not matter whether you have created PHP session or not. Meaning enabling user session does not impact the lifespan of the class provider by service provider.

Is this understanding right or wrong? I could not find a way to figure this out from current laravel documentation. Is there any documentation available that provides more elaboration on this subject?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2k3TQlM
via IFTTT

Aucun commentaire:

Enregistrer un commentaire