Laravel this is not only a practical framework, it is also a programming style
jeudi 17 mars 2016
Using a dynamic variable as the name of a model
How would I go about calling a model using a dynamic variable? I thought $nameOfModel::all() would work. How do I go about doing this? I have 4 different tables that need to make use of the same function.
Aucun commentaire:
Enregistrer un commentaire