0

I'm trying to implement the reset password function using the built-in function from Laravel 5.7 as i have defined my routes in my web.php. I tried running php artisan route:list , It gave me an exception

UPDATE

Sorry for the lack of information given. I have already ran the command php artisan make:auth previously and the Auth::routes() has already been defined in web.php I am trying to access function resets in ResetPasswords traits through my ResetPasswordControllerbut it gave an exception

Class App\Http\Controllers\ResetPasswordController does not exist

I am using the pre-defined controller that is located at App\Http\Controllers\Auth\ResetPasswor.php

ResetPasswordController

<?php namespace App\Http\Controllers\Auth; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\ResetsPasswords; class ResetPasswordController extends Controller { use ResetsPasswords; public function reset(Request $request){ $reset = $this->reset($request); } /** * Where to redirect users after resetting their password. * * @var string */ protected $redirectTo = '/home'; /** * Create a new controller instance. * * @return void */ public function __construct() { $this->middleware('guest'); } } 

web.php

Auth::routes(); Route::post('password/reset','ResetPasswordController@reset'); 
3
  • error say dont find SendsPasswordResetEmails in your Auth folder check this Commented Oct 2, 2018 at 14:48
  • check the namespace of your missing class is correct too Commented Oct 2, 2018 at 14:48
  • Have you ran php artisan make:auth to let Laravel generate these classes? According to this Also make sure you are calling the right classes, unless you have made some custom ones, they should be Auth\ForgotPasswordController and Auth\ResetPasswordController Commented Oct 2, 2018 at 14:54

1 Answer 1

1

SOLUTION

I have figured out where did i do wrong i had to add a Auth\ in my routes

Route::post('password/reset','Auth\ResetPasswordController@reset'); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.