Enhance TestEmailController and view to include CSRF token and improve form security
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 1m51s
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 1m51s
This commit is contained in:
@@ -10,7 +10,7 @@ class TestEmailController extends Controller
|
||||
|
||||
public function show()
|
||||
{
|
||||
return view('test-email');
|
||||
return view('test-email', ['token' => csrf_token()]);
|
||||
}
|
||||
|
||||
public function send(Request $request)
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ url('test-email/send') }}">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
<div class="form-group{{ $errors->has('recipient') ? ' has-error' : '' }}">
|
||||
<label for="recipient">Recipient Email</label>
|
||||
<input type="email"
|
||||
|
||||
Reference in New Issue
Block a user