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?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire