Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Am I looking in the right place (https://www.yiiframework.com/doc/guide/2.0/en/db-active-record) for information on how to select an activerecord and return the object with some child data inside of it?
- i.e. I can do $department = Department::findOne($id) and I can access $department->employees (which is related data) but I want to return $departments with their employees as an array inside.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement