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 -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

Python Tornado package error when running server -