public function destroy() { // Use Auth::id() if ($this->userRepository->destroy(Auth::id())) { Auth::logout(); flash()->success('Your account has been closed.'); return redirect()->route('register_path'); } }