0
I am a beginner in Latin and I have a difficulty that I cannot solve. You are returning the following error:
Target class [SendMailNewsLetter] does not exist.
What should I do? I have searched the net, but without success. Thanks for your attention.
For better understanding, the following is the code.
HTML:
<form action="enviar" method="post">
{{csrf_field()}}
<div class="form-row">
<div class="col-lg-8 form-group">
<input type="email"
class="form-control input"
name="email"
id="email"
placeholder="Seu email"
data-msg="Por favor digite um email válido" />
<div class="validate"></div>
</div>
<div class="col-lg-2 form-group">
<div class="text-center">
<button class="btn-cor-especial" type="submit">Ok</button>
</div>
</div>
<div class="mb-3">
<div class="sent-message">Sua mensagem foi enviada. Obrigado!</div>
<div class="loading">Carregando</div>
</div>
</div>
</form>
Route:
Route::post('enviar','SendMailNewsLetter@mailNewsLetter');
Controller:
class SendMailNewsLetter extends Controller
{
public function mailNewsLetter(Request $request)
{
dd("ok");
}
}
error happens while displaying or submitting the form? maybe it makes it easier if you put the entire controller
– Pedro Sanção