当用户重置他们的密码时,他们会被发送到我的仪表板。我需要将它们引导到其他地方,从我读过的内容中,我只需在我的 ResetPasswordController 中添加 RedirectTo,但这样做没有任何效果:
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class ResetPasswordController extends Controller
{
use ResetsPasswords;
protected $redirectTo = '/checkcart';
public function __construct()
{
$this->middleware('guest');
}
}
更新以提供有关默认身份验证路由的路由信息
检查车路线:
Route::get('checkcart', 'CartController@checkcart');
密码重置路径由
Route::auth();
它具有默认值:
public function auth()
{
// Authentication Routes...
$this->get('login', 'Auth\LoginController@showLoginForm')->name('login');
$this->post('login', 'Auth\LoginController@login');
$this->post('logout', 'Auth\LoginController@logout')->name('logout');
// Registration Routes...
$this->get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
$this->post('register', 'Auth\RegisterController@register');
// Password Reset Routes...
$this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
$this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
$this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
$this->post('password/reset', 'Auth\ResetPasswordController@reset');
}