Small optimisations.

This commit is contained in:
James Cole
2015-03-29 18:28:49 +02:00
parent bd96b2819f
commit 9be05e7e17
3 changed files with 21 additions and 2 deletions

View File

@@ -75,6 +75,14 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
return $this->hasManyThrough('FireflyIII\Models\PiggyBank', 'FireflyIII\Models\Account');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasManyThrough
*/
public function transactions()
{
return $this->hasManyThrough('FireflyIII\Models\Transaction', 'FireflyIII\Models\TransactionJournal');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/