lundi 29 mai 2017

Does Laravel Framework instantiate every model class at boot?

With, where, hasMany etc. methods of Eloquent class are not static.

However we call these functions like that:

// Post is a child of Model class.
Post::where(...); // we don't use New keyword.

So, does Laravel Framework initiate all Model instances before we call their methods?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire