jeudi 13 avril 2017

Laravel 5.4 - get eloquent relation paths

Is it possible to get all relationships, defined in the project, as a path?

Tablestructure

customers

contracts
  customer_id

contacts
  customer_id

webs
  contract_id

What I wanna achieve

Get all relationship paths like so

customers.contact

customers.contract

customers.contract.webs





Aucun commentaire:

Enregistrer un commentaire