test this shit

This commit is contained in:
ilmedova 2021-11-23 16:09:32 +05:00
parent b065f03559
commit 2d1c606fdf
2 changed files with 11 additions and 6 deletions

View File

@ -29,18 +29,21 @@ class ContactController extends Controller
$resp = $recaptcha->verify($recapresponse, $_SERVER['REMOTE_ADDR']);
if($resp->isSuccess()) {
if($request->file('file')){
$image = $request->file('file');
$path = $request->file('file')->store(
'uploads/mails/'.time().'.'.$image->getClientOriginalExtension()
);
}
$image = $request->file('file');
$path = $request->file('file')->store(
'uploads/mails/'.time().'.'.$image->getClientOriginalExtension()
);
$data = array(
'name' => $request->name,
'email' => $request->email,
'subject' => $request->subject,
'message' => $request->message,
'image' => $path
'image' => $path ?? ''
);
// Mail::send('email_temp', [
// 'data' => $data

View File

@ -5,5 +5,7 @@
<p style="margin-top: 0px;padding-left: 25px;">{{ $data['subject'] }}</p>
<p style="font-weight: bold;margin-bottom: 0px;padding-left: 25px;">Ugradylan Hat: </p>
<p style="margin-top: 0px;padding-left: 25px;">{{ $data['message'] }}</p>
<img src="https://turkmentv.gov.tm/{{ $data['image'] }}" alt="Turkmentv">
@if($image)
<a href="https://turkmentv.gov.tm/{{ $data['image'] }}" target="_blank" alt="Turkmentv">
@endif
<p style="background-color: aliceblue;padding: 25px;padding-top: 10px;padding-bottom: 10px;font-weight: bold;color: #024198;">Turkmen Tv Contact Form Page</p>