Explain Laravel Polymorphic Relations
http://laravel.com/docs/eloquent#polymorphic-relations
Polymorphic relations allow a model to belong to more than one other
model, on a single association. For example, you might have a photo model
that belongs to either a staff model or an order model.
I don't really understand this use case. Does this mean that a member of
staff could own a photo, or the photo could be placed in an order? Why not
just put photo_id in staff table and photo_id in order table?
Could somebody please provide an alternative, simple to understand,
example where polymorphic relations may be used?
There isn’t a question that injuries caused personally can cause bad effects for the victim. Read on to see how you can have the best chance of winning your case. Personal injury law can be tough to win.
ReplyDeletecelebreepreschool |
cityimportedautos |
comparethecollege |
crupetech |
digitalpctech |