Yes, you can override Eloquent foreign key of the relationship in laravel bypass a second argument to the
As you know eloquent by default determines the foreign key of the relationship based on the model name.
if the module name is User then eloquent automatically set a
user_id as a foreign key.
in the module, you can pass a second argument to the
hasOne method like
return $this->hasOne('User\Phone', 'Your_foreign_key_name');