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

This commit is contained in:
Frank John Begornia
2026-02-26 23:12:00 +08:00
parent 701a433174
commit 60fcf08cbc
2 changed files with 3 additions and 2 deletions

View File

@@ -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)

View File

@@ -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"