getModel(); $data['password'] = password_hash($data['password'], PASSWORD_BCRYPT); $user->fill($data); $user->save(); return $user; } public function update(User $user, array $data) { $user->fill($data); $user->save(); return $user; } }