Clean up models, fixed a bug.

This commit is contained in:
James Cole
2014-12-01 06:09:27 +01:00
parent d7b0106e7d
commit 4720519aef
9 changed files with 61 additions and 35 deletions

View File

@@ -32,7 +32,7 @@ use LaravelBook\Ardent\Ardent;
* @method static \Illuminate\Database\Query\Builder|\User whereReset($value)
* @method static \Illuminate\Database\Query\Builder|\User whereRememberToken($value)
* @method static \Illuminate\Database\Query\Builder|\User whereMigrated($value)
* @property-read \Illuminate\Database\Eloquent\Collection|\Reminder[] $reminders
* @property-read \Illuminate\Database\Eloquent\Collection|\Reminder[] $reminders
*/
class User extends Ardent implements UserInterface, RemindableInterface
{
@@ -97,10 +97,6 @@ class User extends Ardent implements UserInterface, RemindableInterface
{
return $this->hasManyThrough('Piggybank', 'Account');
}
public function transactions()
{
return $this->hasManyThrough('TransactionJournal', 'Transaction');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
@@ -126,7 +122,6 @@ class User extends Ardent implements UserInterface, RemindableInterface
return $this->hasMany('Reminder');
}
/**
* @param $value
*/
@@ -143,4 +138,9 @@ class User extends Ardent implements UserInterface, RemindableInterface
return $this->hasMany('TransactionJournal');
}
public function transactions()
{
return $this->hasManyThrough('TransactionJournal', 'Transaction');
}
}