Search the Community
Showing results for tags 'tutorial'.
Found 1 result
Hi, I got all the way through the tutorial with no problems until the very end. In “EmployeeController.php” I’m trying to get yii to display the relation for department rather than the ID number. I have tried this code in the loadModel method: $model=Employee::model()->with('department')->findByPk((int)$id); I have double checked all of my relations and they all seem to be in order. It’s still showing the ID number rather than the department name. Any ideas? Thanks