Example #1
0
 /**
  * Save user profile.
  *
  * @param  \Orchestra\Model\User|\Illuminate\Database\Eloquent\Model  $user
  * @param  array  $input
  *
  * @return void
  */
 protected function saving($user, array $input)
 {
     $user->setAttribute('email', $input['email']);
     $user->setAttribute('fullname', $input['fullname']);
     $this->fireEvent('updating', [$user]);
     $this->fireEvent('saving', [$user]);
     $user->saveOrFail();
     $this->fireEvent('updated', [$user]);
     $this->fireEvent('saved', [$user]);
 }
Example #2
0
 /**
  * Saving new password.
  *
  * @param  \Orchestra\Model\User $user
  * @param  array  $input
  */
 protected function saving(Eloquent $user, array $input)
 {
     $user->setAttribute('password', $input['new_password']);
     $user->saveOrFail();
 }