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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -