-
Hello there, I implemented a V2 of my API which uses a different user model. My previous User model had the model_type Is it possible to use something like a middleware to modify the model_type if the user is accessing the API via a v2 endpoint? Thank you for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
use |
Beta Was this translation helpful? Give feedback.
use
Relation::morphMap
to aliasmodel_type
to a standard nameenforcing-morph-maps-in-laravel
custom-polymorphic-types