Changeset View
Changeset View
Standalone View
Standalone View
src/app/UserAlias.php
Show All 18 Lines | class UserAlias extends Model | ||||
/** | /** | ||||
* The user to which this alias belongs. | * The user to which this alias belongs. | ||||
* | * | ||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||||
*/ | */ | ||||
public function user() | public function user() | ||||
{ | { | ||||
return $this->belongsTo( | return $this->belongsTo('\App\User', 'user_id', 'id'); | ||||
'\App\User', | |||||
'user_id', /* local */ | |||||
'id' /* remote */ | |||||
); | |||||
} | } | ||||
} | } |