mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-06-25 16:04:37 -05:00
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.
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Mail\LocationAppeal;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
@ -12,12 +11,20 @@ class AppealMailController extends Controller
|
||||
/**
|
||||
* Send appeal request
|
||||
*/
|
||||
public function sendAppeal(Request $request): RedirectResponse
|
||||
public function sendAppeal(Request $request)
|
||||
{
|
||||
//$order = Order::findOrFail($request->order_id);
|
||||
$token = csrf_token();
|
||||
|
||||
Mail::to('ro@h-i.works')->send(new LocationAppeal());
|
||||
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 redirect('/appeals');
|
||||
return back()->with('message', "Appeal Filed");
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user