This commit is contained in:
ericli1018
2025-06-13 12:24:35 +08:00
parent 1caae33c43
commit 6dfe3e0677
74 changed files with 1497 additions and 253 deletions

View File

@ -5,6 +5,8 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use \App\Http\Requests\SupportTechnicalRequest;
use Carbon\Carbon;
use Illuminate\Support\Facades\Mail;
use App\Mail\CustomerServiceMail;
class SupportTechnicalController extends Controller
{
@ -26,6 +28,27 @@ class SupportTechnicalController extends Controller
'comments' => $request->input('comments'),
'created_at' => Carbon::now(),
]);
return redirect()->back()->with('success', 'We have received your technical inquiry');
try
{
$data = 'First Name: ' . $request->input('name_first') . "\n";
$data .= 'Last Name: ' . $request->input('name_last') . "\n";
$data .= 'Company Name: ' . $request->input('company_name') . "\n";
$data .= 'Job Title: ' . $request->input('job_title') . "\n";
$data .= 'Email: ' . $request->input('email') . "\n";
$data .= 'Phone: ' . $request->input('phone') . "\n";
$data .= 'Contry: ' . $request->input('contry') . "\n";
$data .= 'Comments: ' . $request->input('comments') . "\n";
$data .= 'Created At ' . Carbon::now() . "\n";
Mail::to('service.cri@coreality-inc.com')->send(
new CustomerServiceMail($data)
);
}
catch (Exception $ex)
{
}
return redirect()->back()->with('success', 'We have received your customer sercvice inquiry');
}
}