a bit of progress
This commit is contained in:
@@ -114,6 +114,22 @@ class Character extends Model
|
||||
return $this->hasMany(CrimeAttempt::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the attacks made by this character.
|
||||
*/
|
||||
public function attacks(): HasMany
|
||||
{
|
||||
return $this->hasMany(Attack::class, 'attacker_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the attacks received by this character.
|
||||
*/
|
||||
public function attacksReceived(): HasMany
|
||||
{
|
||||
return $this->hasMany(Attack::class, 'defender_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the activity logs for the character.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user