vendredi 27 mai 2016

Laravel Foreign Key field name without '_id'

I realise Laravel looks for the 'parent_id' field in my child table, but I have two parent fields in the child table. And I want to name the field differently rather than 'parent_id'.

How can I convey my field name to Laravel while lookig for the FK?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire