I'm making a password reset in Laravel 5.2 but I have 2 problems.
1) After the user gives in his email, the view from getSent doesn't get show, it just refreshes the email page.
2) When I click the link in the email, I receive this error
Method App\Http\Controllers\Auth\PasswordController::getToken() does not exist
Here's the code of my passwordController, I'm not sure if this is enough to help me, so let me know if you need any other code.
namespace App\Http\Controllers\Auth;
use View;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class PasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
use ResetsPasswords;
/**
* Create a new password controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
public function getSent()
{
return View::make('auth.passwordSent');
}
}
EDIT: Here are my routes
Route::group(['middleware' => ['web', 'csrf']], function () {
Route::get('/password/reset/email', 'Auth\PasswordController@getEmail');
Route::post('/password/reset/email', 'Auth\PasswordController@postEmail');
Route::get('/password/reset/sent', 'Auth\PasswordController@getSent');
Route::get('/password/reset/{token}', 'Auth\PasswordController@getToken');
Route::post('/password/reset', 'Auth\PasswordController@postReset');
});