diff --git a/.DS_Store b/.DS_Store index 86e7d7e1..b2fb0e22 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/app/Http/Controllers/WebController.php b/app/Http/Controllers/WebController.php index b57556c8..b1bb1db6 100644 --- a/app/Http/Controllers/WebController.php +++ b/app/Http/Controllers/WebController.php @@ -3,6 +3,9 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Mail; +use App\Mail\SendMail; + use App\Models\Menu; use App\Models\Slider; use App\Models\News; @@ -146,4 +149,27 @@ class WebController extends Controller 'meta_description' => $page->meta_description, ]); } + + + + public function Contact(){ + + return view('web.contact')->with([ + 'title' => 'Turkmen Tv | Habarlashyk', + 'keywords' => '', + 'meta_description' => '', + ]); + } + + + public function Send(Request $request){ + $data = array( + 'name' => $request->name, + 'message' => $request->message + ); + + Mail::to('mahabatmudirligi@gmail.com')->send(new SendMail($data)); + return back()->with('success', 'Hatynyz Ustunlikli ugradyldy.'); + + } } diff --git a/app/Mail/SendMail.php b/app/Mail/SendMail.php new file mode 100644 index 00000000..c0695f9d --- /dev/null +++ b/app/Mail/SendMail.php @@ -0,0 +1,35 @@ +data = $data; + } + + /** + * Build the message. + * + * @return $this + */ + public function build() + { + // return $this->view('view.name'); + return $this->from('shokki.a96@gmail.com')->subject('Turkmen Tv')->view('email_temp')->with('data', $this->data); + } +} diff --git a/database/.DS_Store b/database/.DS_Store index b901c330..972948f6 100644 Binary files a/database/.DS_Store and b/database/.DS_Store differ diff --git a/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL29rdXouanBn1560327321.png b/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL29rdXouanBn1560327321.png new file mode 100644 index 00000000..08b63ba6 Binary files /dev/null and b/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL29rdXouanBn1560327321.png differ diff --git a/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL29vb2tra3V6enouanBn1560327321.png b/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL29vb2tra3V6enouanBn1560327321.png new file mode 100644 index 00000000..68a842ec Binary files /dev/null and b/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL29vb2tra3V6enouanBn1560327321.png differ diff --git a/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL2thbWlsX2dpZi5naWY1560327321.png b/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL2thbWlsX2dpZi5naWY1560327321.png new file mode 100644 index 00000000..abc1b4c6 Binary files /dev/null and b/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL2thbWlsX2dpZi5naWY1560327321.png differ diff --git a/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL3Jvd2FjbHlneW5fd2F0YW55X19tYWhhYmF0X211ZGlybGlnaV9yZWtsYW1hX3llcmluZV8uanBn1560327321.png b/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL3Jvd2FjbHlneW5fd2F0YW55X19tYWhhYmF0X211ZGlybGlnaV9yZWtsYW1hX3llcmluZV8uanBn1560327321.png new file mode 100644 index 00000000..81bc230d Binary files /dev/null and b/public/uploads/.tmb/l1_d2ViL2FkdmVydGlzZW1lbnRzL3Jvd2FjbHlneW5fd2F0YW55X19tYWhhYmF0X211ZGlybGlnaV9yZWtsYW1hX3llcmluZV8uanBn1560327321.png differ diff --git a/resources/views/email_temp.blade.php b/resources/views/email_temp.blade.php new file mode 100644 index 00000000..7892ba23 --- /dev/null +++ b/resources/views/email_temp.blade.php @@ -0,0 +1,3 @@ +

{{ $data['name'] }}

+

{{ $data['message'] }}

+

Turkmen Tv Contact Form Page

diff --git a/resources/views/web/contact.blade.php b/resources/views/web/contact.blade.php new file mode 100644 index 00000000..89a2bd07 --- /dev/null +++ b/resources/views/web/contact.blade.php @@ -0,0 +1,79 @@ +@extends('web.layouts.app') +@section('content') + +
+ + + +
+
+ + + + + +

Habarlaşmak üçin

+
+ @if($message = Session::get('success')) + + @endif +
+ + {{ csrf_field() }} + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+
+ + + +
+
+@endsection diff --git a/resources/views/web/layouts/footer.blade.php b/resources/views/web/layouts/footer.blade.php index efbffdda..a2d0c62b 100644 --- a/resources/views/web/layouts/footer.blade.php +++ b/resources/views/web/layouts/footer.blade.php @@ -5,6 +5,33 @@ + + + + + - +