Websitemde bir tane iletişim formu var. Formun tüm verilerini doldurduktan sonra gönder tuşuna bastığımda "something wrong" yazan beyaz bir sayfaya atıyor. Tüm kodları aşağı bırakacağım. Yardımınız için teşekkürler.
This part form front end. (katilim.blade.php)
<div class="col-lg-6 offset-lg-3">
<section class="ts-contact-form p-0">
<div class="container">
<h3 class="wow fadeInUp">Fuar Katılım Formu</h3>
<div class="screen-reader-response">
<p role="status" aria-live="polite" aria-atomic="true"></p>
@if ($errors->any())
<div class="alert alert-danger">
@foreach ($errors->all() as $error)
<div class="button-style">{{ $error }}</div>
@endforeach
</div>
@endif
<div style="height: auto;padding: 0 15px" class="button-style">
@include('flash::message')
</div>
</div>
<div class="row">
<div class="col-lg-12 mx-auto">
<form id="contact-form" class="contact-form" method="post">
@csrf
<div class="error-container"></div>
<div class="row">
<div class="col-md-12">
<div class="form-group wow fadeInUp">
<input class="form-control form-control-name" placeholder="Firma Adı" name="form_firma" id="f-name"
type="text" required>
</div>
<div class="form-group wow fadeInUp">
<input class="form-control form-control-name" placeholder="Ad Soyad" name="form_name" id="f-name"
type="text" required>
</div>
<div class="form-group wow fadeInUp">
<input class="form-control form-control-name" placeholder="Pozisyon" name="form_pozisyon" id="subject"
type="text" required>
</div>
</div>
<div class="col-md-12">
<div class="form-group wow fadeInUp">
<input class="form-control form-control-subject" placeholder="Telefon" name="form_phone" id="subject"
required>
</div>
</div>
<div class="col-md-12">
<div class="form-group wow fadeInUp">
<input class="form-control form-control-email" placeholder="E-mail" name="form_email" id="email"
type="email" required>
</div>
</div>
<div class="col-md-12">
<div class="form-group wow fadeInUp">
<input class="form-control form-control-subject" placeholder="Ülke/Şehir" name="form_city" id="subject"
required>
</div>
<div class="col-md-12">
<div class="form-group wow fadeInUp">
<select class="form-control form-control-subject" name="form_fuar" id="subject"
required style="padding: 0px;">
<option>Fuar Seçiniz:</option>
@php($products=DB::table('projects')->where('category_id', 1)->where('status', 'active')->where('deleted_at', null)->orderBy('sort','asc')->limit(10)->get())
@foreach($products as $pr)
<option value="Fuar Seçiniz">{{ $pr->title }}</option>
@endforeach
</select>
</div>
</div>
<div class="text-center"><br>
<button class="btn home-contact-btn wow fadeInUp" type="submit">Gönder</button>
</div>
</form>
}
This second part form mailer codes. (katilimForm.blade.php)
</td>
</tr>
<tr>
<td align="center" valign="top">
<!-- BEGIN BODY // -->
<table border="0" cellpadding="0" cellspacing="0" width="600" id="templateBody">
<tr>
<td valign="top" class="bodyContainer">
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="TextBlock">
<tbody class="TextBlockOuter">
<tr>
<td valign="top" class="TextBlockInner">
<table align="left" border="0" cellpadding="0" cellspacing="0" width="600" class="TextContentContainer">
<tbody>
<tr>
<td valign="top" class="TextContent" style="padding-top:30px; padding-right: 18px; padding-bottom: 9px; padding-left: 18px;">
<span style="font-size:24px"><span style="font-family:arial,helvetica neue,helvetica,sans-serif"><strong>
<span style="color:#3a85e2">
<span style="font-size:30px; line-height:32px;">
Fuar Katılım Formu
</span>
</span>
<br>
</strong>
</span>
</span><br />
Ad Soyad : {!! $form_name !!}
<br>
<br>
Telefon : {!! $form_phone !!}
<br>
<br>
E-mail : {!! $form_email !!}
<br>
<br>
Firma : {!! $form_firma !!}
<br>
<br>
Pozisyon : {!! $form_pozisyon !!}
<br>
<br>
Ülke/Şehir : {!! $form_city !!}
<br>
<br>
Fuar : {!! $form_fuar !!}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<!-- // END BODY -->
</td>
</tr>
</table>
<!-- // END TEMPLATE -->
</td>
</tr>
</table>
</center>
</div>
</div>
This third part TemplateController.php
public function katilim(Request $request)
{
if ($request->All()) {
$data = $request->All();
$data = [
'form_name' => $request->form_name,
'form_email' => $request->form_email,
'form_phone' => $request->form_phone,
'form_message' => $request->form_message,
'form_firma' => $request->form_firma,
'form_pozisyon' => $request->form_pozisyon,
'form_city' => $request->form_city,
'form_fuar' => $request->form_fuar,
];
Mail::send('frontend.katilimForm', $data, function($message) use($data)
{
$message->to('reklam@startfuar.com', '')
->subject('Start Fuarcılık | Katılım Formu');
$message->to('webmaster@ucyirmiiki.com', '')
->subject('Start Fuarcılık | Katılım Formu');
});
echo 'mail gonderildi';
}
exit;
}
this last part web route settings
Route::get('/katilim', function () {
return view('frontend.katilim');
});
Route::post('/katilim', 'frontend\TemplateController@katilimForm');