I have to many relations in my API where the user can pass on the URL like this &relation&relation2&relation3, in my controller I test if this relation is been called in the URL and call a method like withRelation, withRelation2, etc..
How can I create a main method called with($relation) and if I call withRelation it transforms into with('relation')?
Actual Examples:
withProducts should transform into with('products')
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2u2iBRD
via IFTTT
Aucun commentaire:
Enregistrer un commentaire