I believe that everything is written in the document:
ake note that Eloquent assumes a foreign relationship key based on the model name. In this case, it is assumed that the phone model uses the user_id foreign key. If you want to override this convention, you can pass the second argument to the hasOne method. Alternatively, you can pass the third argument to the method to indicate which local column to use for the association:
This basically means that "local_key" is the name of the table column in your db, which is responsible for matching the associated object (phone) with your current object (user).
If you look at db, Iβm sure that you will find a table user with a column phone_id, try changing it to something else (for example, βphoneβ), and your eloquent query will work. Then change your call to return $this->hasOne('Phone', 'user_id', 'phone'); and it may work again.
source share