I have these tables:
users, articles, images.
images could be for users, or articles, or none. I mean some images have no foreign_key. they have no relationships.
there are 3 solutions in my mind:
use an eloquent Polymorphic Relationship, with nullable imageable_id and imageable_type columns. is this even possible?
don't use a foreign_key in the images table. instead, create these pivot tables: