<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
use App\Mail\pedidoMail;


class MailController extends Controller
{
    public function enviarCorreo(Request $request)
    {
        $data = [
            'nombre' => $request->input('nombre'),

        ];

        Mail::to($request->input('dev@paginawebguatemala.com'))->send(new pedidoMail($data));

        return "Correo enviado correctamente";
    }
}
