lundi 29 mai 2017

laravel many to many relation additional foreign key.?

i'm trying to get extra column as foreign key in laravel many to many relationship..here is my table structure

idcards 
   id,
   name,
quality
   id,
   name
idcard_quality
  id,
  idcard_id
  quality_id
  related_id

in above idcard_quality table i want add extra foreign key related_id, i wanted to retrieve result like every idcard hasmany qualities and that quality is another idcard.. suppose one idcardcard has one normal quality and that normal quality is different idcard... please help me



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire