I need to update a user int field in SQL by clicking button that was sent to my email.
I tried doing this ://127.0.0.1:8000/edit/{id}
I tried connection to email and SQL Server but it didn't work.
My current send controller is:
public function store() {
$data = request()->validate([
'txt_name' => 'required',
'num_empleado' => 'required',
'txt_planta' => 'required',
'txt_puesto' => 'required',
'txt_depa' => 'required',
'area' => 'required',
'txt_jefe' => 'required',
'diaSolicitado' => 'required',
'txt_emailjefe'=>'required'
]);
Mail::to('email.com')->send(new Form($data));
return redirect('edit-records')->with('message',' your application was successfull');
and my email template is
@component('mail::message') Solicitud día IMI
Por Medio del
Del empleado: {{$data['txt_name']}}
Numero de empleado: {{$data['num_empleado']}}
Puesto: {{$data['txt_puesto']}}
Planta: {{$data['txt_planta']}}
Departamento: {{$data['txt_depa']}}
Área: {{$data['area']}}
Día Solicitado: {{$data['diaSolicitado']}}
@component('mail::button', ['url' => 'http://127.0.0.1:8000']) autorizacion
@component('mail::button', ['url' => '',])
@endcomponent
Thanks
@endcomponent
I expect the output to show a success message by confirming in the email the status.
I expect to update the specific field and show a success message:
Its up
I expect to update specific SQL field and show a success message on a web page.