'required|email|unique:users,email', 'migrated' => 'required|numeric|between:0,1', 'password' => 'required|between:60,60', 'reset' => 'between:32,32', ]; /** * The database table used by the model. * * @var string */ protected $table = 'users'; /** * The attributes excluded from the model's JSON form. * * @var array */ protected $hidden = ['remember_token']; /** * @return array */ public static function factory() { return [ 'email' => 'email', 'password' => 'sander', 'migrated' => '0' ]; } /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function accounts() { return $this->hasMany('Account'); } /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function budgets() { return $this->hasMany('Budget'); } /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function categories() { return $this->hasMany('Category'); } /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function components() { return $this->hasMany('Component'); } /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function preferences() { return $this->hasMany('Preference'); } /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function recurringtransactions() { return $this->hasMany('RecurringTransaction'); } /** * @param $value */ public function setPasswordAttribute($value) { $this->attributes['password'] = Hash::make($value); } public function piggybanks() { return $this->hasManyThrough('Piggybank', 'Account'); } /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function transactionjournals() { return $this->hasMany('TransactionJournal'); } }