我這樣做:Laravel自定義密碼重置
public function ForgotPassword(Request $request) {
$template_data = [
'template' => $this->template->ConstructArrayTemplate()
];
$rules = ['email' => 'required|exists:accounts|email'];
$validator = Validator::make($request->all(), $rules);
$errors = $this->sortErrors ($validator, array('email'));
if ($errors) {
$template_data [ 'Errs' ] = $errors;
$template_data [ 'template' ] [ 'page_name' ] = 'Sign up';
return view('forgot_password', $template_data);
}
$response = $this->passwords->sendResetLink($request->only('email'));
switch ($response)
{
case PasswordBroker::RESET_LINK_SENT:
return redirect('');
}
}
而且由於:
$response = $this->passwords->sendResetLink($request->only('email'));
我得到一個錯誤:
InvalidArgumentException in FileViewFinder.php line 137: View [auth.emails.password] not found.
檢查你是否有這個文件:'resources/views/auth/emails/password.blade.php' –
如果我想要另一個路徑? –