Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

arslan2037's avatar

Getting data from table

I have three table called, projects, stages, substages. Relation between them is like this, project hasmany stages and stages has many substages.

What i can do for getting data something like this, $project->stage->substage->name and it should display name of substage and $project->stage->name this should display name of stage and $project->name should display name of project. How i do this?

0 likes
1 reply

Please or to participate in this conversation.