php - Nested Table Relation in laravel -


tables:

service subservice (service_id) part(sub_service_id) post(part_id)  service:      hasmany subservices  subservice:      belongsto service , hasmany parts  part:     belongsto subservice: , hasmany posts  post:     belongsto part , hasmany posts  

please me:

1: how use hasmanythrough?

2: want access to: $post->service->name

$post->service->count()


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -