,所以我完全完成的;(我不明白如何與實心輸入回Laravel重定向重定向回用輸入Laravel
我簡單的代碼是:
public function postSignIn(Request $request)
{
return redirect()->back()->withInput();
}
我的看法刀片:
<form action="{{ route('signin') }}" method="post">
<div class="form-group {{$errors->has('in_email') ? 'has-error' : ''}}">
<label for="email">Your E-Mail</label>
<input class="form-control" type="text" name="in_email" id="email">
@if ($errors->has('in_email'))
<span class="help-block">{{$errors->first('in_email')}}</span>
@endif
</div>
<div class="form-group {{$errors->has('in_password') ? 'has-error' : ''}}">
<label for="password">Your Password</label>
<input class="form-control" type="password" name="in_password" id="password">
@if ($errors->has('in_password'))
<span class="help-block">{{$errors->first('in_password')}}</span>
@endif
</div>
{{ csrf_field() }}
<button type="submit" class="btn btn-primary">Submit</button>
</form>
但每次都輸入都是空
什麼,我做錯了什麼?
THX
THX;)我看到這個視頻教程,但有些人的評論說,它更容易使用1線「withInput()」不是每個輸入增加價值。多謝! –