Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. 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?
  2.  
  3. 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