thebadspace/app/Http/Controllers/AppealMailController.php

31 lines
786 B
PHP
Raw Normal View History

<?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(env('TBS_ADMIN_EMAIL'))->send(new LocationAppeal($request->location, $request->sponsor));
//return redirect('/appeals');
return back()->with('message', "Appeal Filed");
};
}
}