thebadspace/app/Http/Controllers/AppealMailController.php
ro fe49ca8699 Working Appeals form
Still need to style the email form, but the Appeal Form is working with
a bit of protection from bots to cut down on spam.
2024-02-05 14:02:27 -06:00

31 lines
778 B
PHP

<?php
namespace App\Http\Controllers;
use App\Mail\LocationAppeal;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
class AppealMailController extends Controller
{
/**
* Send appeal request
*/
public function sendAppeal(Request $request)
{
//$order = Order::findOrFail($request->order_id);
$token = csrf_token();
if ($request->h1 != '' || $request->question != 2) {
return back()->withErrors([
'error' => 'Invalid Request',
]);
} else {
Mail::to('ro@h-i.works')->send(new LocationAppeal($request->location, $request->sponsor));
//return redirect('/appeals');
return back()->with('message', "Appeal Filed");
};
}
}