Home > Q&A > body text
1. For example, User::find(1)->hasOneMachine; will report an error because the primary key of the User table is uid instead of id
phpcn_u15822017-05-16 16:53:39
User.php
protected $primaryKey = 'uid';