app/Models/User.php: Adding main_character relationship
This commit is contained in:
parent
e2fe666fc7
commit
b73a8438d4
1 changed files with 5 additions and 0 deletions
|
|
@ -52,6 +52,11 @@ class User extends Authenticatable
|
|||
});
|
||||
}
|
||||
|
||||
public function main_character()
|
||||
{
|
||||
return $this->belongsTo(Character::class, 'character_id');
|
||||
}
|
||||
|
||||
public function characters()
|
||||
{
|
||||
return $this->hasMany(Character::class);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue