laravel - 为什么在没有 CSS LARAVEL 的情况下加载视图
问题描述
我正在发送一个链接以重置密码。链接来了,但是点击链接后,它把我送回视图并且不加载 CSS。我这样做:
控制器:
public function submitForgetPasswordForm(Request $request)
{
$this->validate($request, ['email' => 'required|email|exists:users']);
$token = Str::random(64);
DB::table('password_resets')->insert([
'email' => $request->email,
'token' => $token,
'created_at' => Carbon::now()
]);
Mail::send('email.forgetPassword', ['token' => $token], function($message) use($request){
$message->to($request->email);
$message->from('mail@mail.pl');
$message->subject('Reset Hasła');
});
return back()->with('message', 'Link do resetu hasła został wysłany!');
}
忘记密码.php
Link for reset password
<a href="https://site.pl/reset-password/{{ $token }}">Reset hasła</a>
忘记密码链接.php
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Reset Hasła</div>
<div class="panel-body">
<form class="form-horizontal" method="POST" action="{{ URL::to('reset-done') }}">
{{ csrf_field() }}
<input type="hidden" name="token" value="{{ $token }}">
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" class="col-md-4 control-label">E-Mail</label>
<div class="col-md-6">
<input id="email" type="email" class="form-control" name="email" value="{{ $email or old('email') }}" required autofocus>
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="password" class="col-md-4 control-label">Hasło</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control" name="password" required>
@if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<label for="password-confirm" class="col-md-4 control-label">Potwierdź hasło</label>
<div class="col-md-6">
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
@if ($errors->has('password_confirmation'))
<span class="help-block">
<strong>{{ $errors->first('password_confirmation') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Zresetuj hasło
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
网页.php
Route::get('reset-password/{token}', 'Auth\ForgotPasswordController@showResetPasswordForm');
控制器
public function showResetPasswordForm($token) {
return view('auth.forgetPasswordLink', ['token' => $token]);
}
我做错了什么,点击电子邮件中的链接后,它会将我带到密码重置表格,但没有完善表格,下图。
解决方案
推荐阅读
- c - 如何使用 Cygwin64 和 Clang 构建 32 位应用程序?
- r - R - 函数抛出不好的结果
- sql - SQL - 以常规分隔符间隔解析字段和 SUM 数字
- python-3.x - 如何使用 Dataflow beam/python/Jupyter 从 BigQuery 读取数据并将 csv 保存到 Google 云存储
- python - 如何使用 pandas 计算名称和类型在第一次实例的 60 周期内一起出现的次数?
- unit-testing - 使用 testinfra_hosts 数组,您可以控制测试中用于每个主机的参数化值吗?
- python - Python Pandas Group by
- javascript - Javascript中的同步调用
- node.js - Docker - Puppeteer 需要一些东西并且不会运行
- android - 在动画列表中使用动画中的图像